jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • in reply to: JqxGrid selection problem JqxGrid selection problem #113464

    fritzfrancis
    Participant

    @Mehdi, your latest code snippet solved the issue for me, and I’m running a very old version, 3.8.2! Thank you for sharing.


    fritzfrancis
    Participant

    Looks like I’ll have to get more detailed in order to get any support.

    Here’s what my OnEquipmentTypeExpanding function looks like.

    $scope.OnEquipmentTypeExpanding = function (event)
    {
    	var id = event.data("id");
    	var equipmentType = $scope.FindEquipmentType(id);
    	equipmentType.IsExpanded = true;
    };

    In my jqx-expander element, I’ve added a data-id field that contains the ID of the particular equipment type expander I’m trying to expand. This is then used to find the right object in my scope and set its IsExpanded property to true. This works fine.

    In addition to the example I’ve sited, I’ve also tried doing the same thing for collapsing, but inversely. In my jqx-expander element, I added jqx-on-collapsing="OnEquipmentTypeCollapsing(event)". Here’s what the function looks like:

    $scope.OnEquipmentTypeCollapsing = function (event)
    {
    	var id = event.data("id");
    	var equipmentType = $scope.FindEquipmentType(id);
    	equipmentType.IsExpanded = false;
    };

    I know the issue isn’t with my FindEquipmentType function, because it works fine when expanding. Using the Chrome extension ng-inspector, I can see that the IsExpanded property correctly changes to true when expanding, but it does not work when collapsing.

    Please advise.


    fritzfrancis
    Participant

    I understand how to bind events with angular. My expanded and expanding events work just fine. Please provide a working example, or at least provide more detail than just “the binding which you have now is wrong”.


    fritzfrancis
    Participant

    As I stated, I have already tried using all four events (expanded, expanding, collapsed, and collapsing) to manually set my IsExpanded property to either true or false. The collapse and collapsing events are not working. I have tried jqx-on-collapsed="locationType.IsLoaded = false", but when I collapse an open expander, I go in and look at the IsExpanded property, and it’s still set to true.

    Please advise.

    Regards,
    Fritz Francis


    fritzfrancis
    Participant

    Thanks Peter,

    For some reason I thought the forum and the support was the same thing. I will send my questions there from now on.

    Regards,

    Fritz


    fritzfrancis
    Participant

    Hello Peter,

    Am I not up-to-date on my licensing? I thought I would have the Standard Support of 48 hours. I guess I also need to clarify what “48 hours” mean. Does “48 hours” assume the day to be 24 hour-day or am 8-hour work day? I absolutely love your products, it is cost effective and relatively well documented, I would hate to have use Telerik or SyncFusion just because of lack of support. Do you separate support plans that I could pay separately for that ensures quicker response times?

    Regards,

    Fritz


    fritzfrancis
    Participant

    Hello Peter,

    I was wrong. My solution did not work. The data attribute creates a copy of the object and does not provide me with the object in scope. Can you provide me with a correct solution?

    Regards,

    Fritz


    fritzfrancis
    Participant

    Hello Peter,

    I see that the event.data comes over as a string, so I have to JSON.parse() it back into an object. That’s seems like a code smell to me. Why does the jQuery extension method .scope() does not work? It would be nicer if I could just invoke $(event.target).scope() or $(this).scope() to get back the bound object.

    Regards,

    Fritz


    fritzfrancis
    Participant

    Hello Peter,

    One way that I have found is to use modify my markup to be

    <jqx-expander data-ng-repeat=”locationType in system.LocationTypes” data={{ locationType }}” jqx-on-expanding=”OnLocationTypeExpanding(event)”>

    And then in my controller method I can access event.data. Is that the correct way to handle this?

    Regards,

    Fritz


    fritzfrancis
    Participant

    This is a pretty nice workaround! It doesn’t quite accomplish the same thing because resetting the “placeholder” value requires some event handlers, but this is close enough. Thanks!


    fritzfrancis
    Participant

    Hi Hristo,

    Thank you for the demo, but unfortunately I don’t see how it at all relates to placeholders or allowing the input to be empty. Perhaps I didn’t explain myself well.

    Consider this basic input element: <input type="number" placeholder="no value" />. It would be very nice if the jqxNumberInput could:
    1. Allow the input to be blank, rather than always containing a number.
    2. When blank, display placeholder text.

    Would you guys consider adding this ability in the future? I want to use your widget because of the many options it has, but can’t use it until it can do some of the basic things that a simple HTML5 number input can do.

    Thanks,
    Fritz Francis

    in reply to: The loadedData property The loadedData property #77573

    fritzfrancis
    Participant

    That makes sense. So, if it has the ability to look at only the array inside the JSON object, then putting extra information in the JSON object and referring to it using loadedData seems like a very standard use case. I think other developers would find this functionality very useful, and that loadedData is an excellent candidate to be made into an officially documented property.

    in reply to: The loadedData property The loadedData property #77514

    fritzfrancis
    Participant

    Thanks for your quick reply.

    I’m not quite sure how those properties relate to the question, because in my object, both record and root are blank strings. So I’m still wondering how it knows to use the GridData array rather then the whole JSON object.

    in reply to: The loadedData property The loadedData property #77509

    fritzfrancis
    Participant

    Hi Peter,

    In my case, using the records property was not enough because my dataAdapter’s source URL returns a JSON object that contains more than just an array of my grid data. For instance, let’s say my dataAdapter’s source URL is “/Home/GridJSON”. It returns a JSON object that’s shaped like this:

    {
        ClickOpensNewTab: bool,
        GridData: Array[n],
        IsSuccessful: bool,
        StatusMessage: ""
    }

    As you can see, the JSON object itself isn’t what the grid binds to. Rather, the GridData property inside the JSON object is what it binds to. So in this case, loadedData and records will not be identical. The loadedData property will give me the whole JSON object, whereas the records property will only give me the array.

    This brings up a question: how does the jqxDataAdapter/jqxGrid know to use my GridData array, rather than trying to bind to the whole JSON object and failing? Does it just look for the first array inside the JSON and use that?

    Regards,
    Fritz Francis


    fritzfrancis
    Participant

    I am sure. I have even done a complete search in my Visual Studio solution for the text “showrowdetails”, and the only match I get is in jqx-all.js.

Viewing 15 posts - 1 through 15 (of 28 total)