jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 34 total)
  • Author
    Posts
  • in reply to: DropDownList on mobile devices DropDownList on mobile devices #28584

    dpdragnev
    Member

    Peter,

    You are right, testing it on the actual device worked. There must be some problem with Safari’s rendering engine.

    Thank you


    dpdragnev
    Member

    Thank you Peter,

    I downloaded 2.9.1 and the error is gone.

    Appreciate your help.


    dpdragnev
    Member

    Sorry the code did not display:


    dpdragnev
    Member

    Thank you Peter. That was exactly what I was looking for.


    dpdragnev
    Member

    Got you, that makes sense now. I will do that and will report back the result.

    Thank you.


    dpdragnev
    Member

    Peter,

    I tried moving the code to the success event, but I am getting the same result. Can you think of anything else? Meanwhile, I will keep testing.

    Thank you,


    dpdragnev
    Member

    I have tracked the issue to this code:

    $(‘#btnAddNewGroup’).click(function (e) {
    $.ajax({
    type: “POST”,
    url: “/Contacts/AddNewGroup”,
    data: {
    model: JSON.stringify(new objGroup())
    }
    }).done(function (result) {

    if (result.Success == true) {
    //clean up
    $(‘#NewGroupPopup’).jqxWindow(‘close’);
    $(“#NewGroupForm td > input[type=text]”).val(”);

    //refresh the list box and display the new group
    dataAdapterASG.dataBind();

    //select the last item on the list
    var item = $(“#lstGroups”).jqxDropDownList(‘getItemByValue’, result.Object.GroupId);
    $(“#lstGroups”).jqxDropDownList(‘selectItem’, item);
    }
    else {
    error = true;
    $(“.status-message”).text(result.ErrorMessage);
    }
    }); //ajax call
    });

    Here I am calling a server side method to add the new group to the database after which I am calling the dataBind method. The problem is at the bolded line of code. At this point the new item is not yet available to be selected, however as soon as the code runs to the end, the item is listed in the dropdownlist.

    Is it a question of timing? Maybe I am try to access the refreshed data too early in the cycle?

    Everything else works perfectly. The getItemByValue method works as advertised for the other items except for the new one.

    Thank you


    dpdragnev
    Member

    Yes, 2.8.3 with jQuery 1.9.1


    dpdragnev
    Member

    Thank you Peter,

    Creating a new instance of the dataAdapter and passing it as source worked. My next question is: how do I select an item based on the value? I tried:

    var item = $(“#lstGroups”).jqxDropDownList(‘getItemByValue’, someValue);
    $(“#lstGroups”).jqxDropDownList(‘selectItem’, item);

    but item is always undefined. I could probably traverse all the items and find the index of the item I need and then set the selectedIndex of the dropdownlist, but that seems a little too verbose. Is the code shown above correct? Is there another method to accomplish this?

    EDIT: Actually, the code above works for any of the original items, but not for the newly added item even though the item is listed in the list of items.

    Thanks for your help.


    dpdragnev
    Member

    Please ignore my last post, I just saw that you have fixed that.

    Thank you.


    dpdragnev
    Member

    Thank you Peter. Was that addressed in the new version 2.8.2?


    dpdragnev
    Member

    Thank you Tony, your suggestion worked. This was driving me nuts for 2 days already. Appreciate your help. 🙂

    in reply to: Custom Theme Custom Theme #19084

    dpdragnev
    Member

    That did it. Thank you very much.

    Another thing that I noticed is that after I changed the background color of jqx-widget-header-mytheme class to a darker color (#313131) now I have little while dots on every corner where there is rounding. Looks like the white background of the jqx-widget-content-mytheme is showing under it even though the rounding is set to 3px to both elements.

    I can send you a screenshot if you would like to see it.

    Is there a way to correct this? CSS is not my strongest skill.

    Thank you.

    in reply to: Custom Theme Custom Theme #19036

    dpdragnev
    Member

    Peter,

    Another question: I placed the new css in the same directory as jqx.base.css however, all the paths to the images are broken. Do I have to go manually and adjust them in the new css file?

    in reply to: Custom Theme Custom Theme #19035

    dpdragnev
    Member

    Thank you Peter,

    I have adopted the same technique, using the getTheme function, as you do in your demos because I have a lot of js files and this gives me the flexibility to change the theme from one place only. It works well.

    Renaming the file from mytheme.css to jqx-mytheme.css and adding both files in the correct order did the trick.

    Thank you for your help.

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