|
Title: issue in treegrid Post by: yogesh on September 24, 2012, 03:42:32 AM first i am loading default data and on the search button i am loading search result
when i am doing same in the data grid with below code var opts = $('#dg').datagrid('options'); $('#dg').datagrid({ pageNumber: 1, pageSize: opts.pageSize }); loadSearchData(1, opts.pageSize); its working loadSearchData this function calling data from remote server assigning the datagrid page number back to 1 and pagingcontrol is working but same when i am doing with tree grid treedrid number is set to 1 but paging control is not working paging control losing property mode: 'remote', any sample example or is it bug in treegrid ? Title: Re: issue in treegrid Post by: anton.dutov on September 24, 2012, 06:03:38 AM Try
Code: var opts = $('#dg').datagrid('options');Title: Re: issue in treegrid Post by: anton.dutov on September 24, 2012, 06:07:27 AM Also show the code of function loadSearchData, may be you using .datagrid property inside
Title: Re: issue in treegrid Post by: yogesh on September 24, 2012, 08:15:50 AM below is function function problem is that on click of the next page of the pager control nothing happening no remote call
function loadSearchData(pagenumber, pagesize) { $('#test').treegrid('loading'); searchData = { 'id': _txtdbid, 'filename': _txtdocname, 'doctype': _txtdoctype}; $.ajax({ type: "POST", url: "urllink", contentType: "application/json; charset=utf-8", dataType: "json", data: JSON.stringify(searchData), success: function(data) { $('#test').treegrid('loadData', jQuery.parseJSON(data.d)); enableDnd($('#test')); $('#test').treegrid('loaded'); document.getElementById('grayOut').style.display = "none"; }, error: function() { // error.apply(this, arguments); } }); Title: Re: issue in treegrid Post by: anton.dutov on September 24, 2012, 06:31:53 PM 1.
If ajax query not send then error occurred in ajax invoking code or previous lines possible here Code: searchData = { 'id': _txtdbid, 'filename': _txtdocname, 'doctype': _txtdoctype};2. Browser contains support of JSON object (JSON.stringify) ? 3. What output in error console? 4. Code: document.getElementById('grayOut').style.display = "none";5. For bettre performance call selector once Code: var tree = $('#test'); |