jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: jqxinput autopopulate jqxinput autopopulate #83868

    richa_k
    Participant

    Thanks Dimitar, that did the trick.

    in reply to: jqxinput autopopulate jqxinput autopopulate #83864

    richa_k
    Participant

    Hi,

    I am facing the same issue. If I have already selected a value from the autocomplete dropdown box, then, if I change the value in the text field then it retains the previously selected value as the ‘value’ of the jqxinput instead of the newly typed value.
    Here is an example code. I noticed that the issue comes when displayMember and valueMember are specified.

    div id='content'>
            <script type="text/javascript">
                $(document).ready(function () {              
                    var countries = [{'name':"Afghanistan",'code':'Af'}, {'name':"Albania",'code':'Al'}];
                    $("#input").jqxInput({placeHolder: "Enter a Country", height: 25, width: 200, minLength: 1,  source: countries, displayMember: "name", valueMember: "code" });
    				
    				 $( "#test" ).click(function(event) {
    					$('#result').text($("#input").val().value);
    
            });
                });
    			
    			
            </script>
           <input type="text" id="input"/>
    	   <input type='button' id='test' value='Select'></button>    </div>
    	   <div id='result'></div>

    How do I fetch the typed value?

    Thanks
    -Richa


    richa_k
    Participant

    Hi Peter,

    Thanks for your reply.

    I dont need the custom code.
    Its not a critical requirement but I wanted to confirm in case I missed out on it in the forum or somewhere in the documentation.

    May be it will be a part of the future releases.

    Thanks anyways.

    -Richa


    richa_k
    Participant

    Hi Peter,

    Thank you for the reply.
    I removed the autoBind: true property but its still making multiple calls. Can you please share a working example of jqcombobox inside jqgrid which doesn’t make these multiple ajax calls.

    Thanks

    Regards,
    Richa


    richa_k
    Participant

    Hi Peter,
    When I use backspace the selected part of the date does not clear.
    Instead the year gets set to 1900, the month to 01 and the day to 01.

    Regards,
    Richa


    richa_k
    Participant

    Hi Hristo,

    I meed to have the filters in that grid. I tried using jqxtabs instead of bootstrap and I still get the error.
    Is there something I am missing?

     <script type="text/javascript">
            $(document).ready(function () {
                
                var initGrid2 = function () {
                    var data = '[]';
    
                    // prepare the data
                    var source =
                    {
                        datatype: "json",
                        datafields: [
                            { name: 'CompanyName', type: 'string' },
                            { name: 'ContactName', type: 'string' },
                            { name: 'ContactTitle', type: 'string' },
                            { name: 'Address', type: 'string' },
                            { name: 'City', type: 'string' },
                            { name: 'Country', type: 'string' }
                        ],
                        localdata: data
                    };
                    var dataAdapter = new $.jqx.dataAdapter(source);
    
                    $("#jqxGrid2").jqxGrid(
                    {
                         source: dataAdapter,
                           showstatusbar: true,
                     filterable: true,
                     showfilterrow: true,
                     pageable: true,
                     selectionmode: 'none',
                     autoheight: true,
                     showemptyrow: true,
                     virtualmode: true,
                     sortable: true,
                     enabletooltips: true,
                     sorttogglestates: 1,
                     rendergridrows: function () {
                         return dataAdapter.records;
                     },
             
                        columns: [
                            { text: 'Company Name', datafield: 'CompanyName', width: 250 },
                            { text: 'Contact Name', datafield: 'ContactName', width: 150 },
                            { text: 'Contact Title', datafield: 'ContactTitle', width: 180 },
                            { text: 'City', datafield: 'City', width: 120 },
                            { text: 'Country', datafield: 'Country' }
                        ]
                    });
    				  var localizationobj = {};
                localizationobj.emptydatastring = "My custom message.";
                // apply localization.
                $("#jqxGrid2").jqxGrid('localizestrings', localizationobj);
                }
    
                // init widgets.
                var initWidgets = function (tab) {
                    switch (tab) {
                        case 0:
                            "";
                            break;
                        case 1:
                            initGrid2();
                            break;
                    }
                }
    
                $('#jqxTabs').jqxTabs({ width: 600, height: 560,  initTabContent: initWidgets });
            });
        </script>
    </head>
    <body class='default'>
        <div id='jqxTabs'>
            <ul>
                <li style="margin-left: 30px;">
                    Grid 1
                </li>
                <li>
                    Grid 2
                </li>
            </ul>
            <div style="overflow: hidden;">
                <div style="border:none;" id="jqxGrid">
                </div>
            </div>
            <div style="overflow: hidden;">
                <div style="border:none;" id="jqxGrid2"></div>
            </div>
        </div>

    Please help.
    Thanks
    -Richa


    richa_k
    Participant

    Thank you very much Hristo. I was able to do it with bootstrap tabs. The issue was with the line ‘ showfilterrow: true,’ . I removed that and it worked.

    -Richa

Viewing 7 posts - 1 through 7 (of 7 total)