jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Paging Issue
This topic contains 4 replies, has 2 voices, and was last updated by Yogesh Singh 11 years, 3 months ago.
-
AuthorPaging Issue Posts
-
Hi
Issue i am facing is when i click on search button it fires an ajax call to get data and fill the grid ,the paging works fine while toggling then but when i click on search button the second time and then toggle the paging say 10-5 or 5-10 few columns get removed off from the grid and there is a scroll bar appear at the bottom of the grid that extends far right
I have this below code
//Search view button click making a ajax call to populate the grid after validation ends
$(“#btnSearchView”).bind(‘click’, function () {
if(TC.common.CheckSession(‘ManageView.aspx/CheckSesion’)) {
this.viewName = $(“#txtViewName”).val(); //.split(” “).join(“”);
this.empName = $(“#txtCreatedBy”).val(); //.split(” “).join(“”);if (TC.filters.manageViews.btnSearchViewValidation(this.viewName, this.empName)) {
currentRow = null;
$(“#gridSearchView”).show();
TC.filters.manageViews.loadSearchViewGrid(this.viewName, this.empName);
}
}
});//called when search view button clicks
loadSearchViewGrid: function (viewName, empName) {$.ajax({
type: ‘POST’,
dataType: ‘json’,
async: false,
cache: false,
url: ‘ManageView.aspx/LoadSearchGrid’,
data: JSON.stringify({ viewName: viewName, empName: empName }),
contentType: ‘application/json; charset=utf-8’,
success: function (data) {
TC.filters.manageViews.variables.searchViewGridSource.localdata = data.d;
TC.filters.manageViews.SearchViewGrid(null);
},
error: function (err) {
alert(err.responseText);
}
});
},//Search view grid definition
SearchViewGrid: function (currentRow) {
var searchViewGridDataAdapter = new $.jqx.dataAdapter(TC.filters.manageViews.variables.searchViewGridSource);// Create jqxGrid.
$(“#gridSearchView”).jqxGrid(
{
width: ‘760’,
height: ‘250’,
source: searchViewGridDataAdapter,
theme: TC.filters.manageViews.variables.theme,
sortable: true,
pageable: true,
localization: TC.filters.manageViews.getLocalization(),
columns: [
{ text: ‘View ID’, datafield: ‘VIEW_ID’, hidden: true },
{ text: ‘View Type’, datafield: ‘VIEW_TYPE’, hidden: true },
{ text: ‘View Name’, datafield: ‘VIEW_NAME’, width: ‘175’ },
{ text: ‘Created By’, datafield: ‘NAME’, width: ‘175’ },
{ text: ‘Modified Date’, datafield: ‘CREATED_DATE’, width: ‘175’, cellsformat: ‘dd/MM/yyyy h:mm:ss tt’ },
{
text: ‘Action’,
width: ‘235’,
cellsalign: ‘left’,
cellsrenderer: TC.filters.manageViews.AddMecellsrenderer
}
]
});
},//Display Add or Remove button in the grid based on conditions
AddMecellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) {var viewType = $(“#gridSearchView”).jqxGrid(‘getcellvalue’, row, ‘VIEW_TYPE’);
if (row == currentRow) {
if (linkbtnText == “Remove Me from this View”)
return ‘<Label style=”width:95%;position:absolute; bottom:2px;top:2px;left:2px;right:2px”>You have been removed from this View</Label>’;
else
return ‘<Label style=”width:95%;position:absolute; bottom:2px;top:2px;left:2px;right:2px”>You have been added to this View</Label>’;
} else {if (viewType == “Shared”)
return ‘<input type=”button” style=”width:75%;position:absolute; bottom:2px;top:2px;left:2px;right:2px” class=”button-link-Add-Remove-SharedView link” value=”Remove Me from this View” />’;
else
return ‘<input type=”button” style=”width:60%;position:absolute; bottom:2px;top:2px;left:2px;right:2px” class=”button-link-Add-Remove-SharedView link” value=”Add Me to this View”/>’;
}
},Hi Yogesh Singh,
Unfortunately, the provided code does not allow us to test your scenario. If you wish, provide a sample in JSFiddle which we would be able to test and which demonstrates the described behavior.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter
Below is the local data in the xml format in the source variable you might find it useful for testing
<NewDataSet>
<xs:schema id=”NewDataSet” xmlns=”” xmlns:xs=”http://www.w3.org/2001/XMLSchema” xmlns:msdata=”urn:schemas-microsoft-com:xml-msdata” xmlns:msprop=”urn:schemas-microsoft-com:xml-msprop”>
<xs:element name=”NewDataSet” msdata:IsDataSet=”true” msdata:MainDataTable=”View” msdata:UseCurrentLocale=”true”>
<xs:complexType>
<xs:choice minOccurs=”0″ maxOccurs=”unbounded”>
<xs:element name=”View” msdata:CaseSensitive=”False”>
<xs:complexType>
<xs:sequence>
<xs:element name=”VIEW_ID” msprop:OraDbType=”113″ type=”xs:long” minOccurs=”0″ />
<xs:element name=”VIEW_NAME” msprop:OraDbType=”126″ type=”xs:string” minOccurs=”0″ />
<xs:element name=”EMPLID” msprop:OraDbType=”126″ type=”xs:string” minOccurs=”0″ />
<xs:element name=”CREATED_BY” msprop:OraDbType=”126″ type=”xs:string” minOccurs=”0″ />
<xs:element name=”CREATED_DATE” msprop:OraDbType=”106″ type=”xs:dateTime” minOccurs=”0″ />
<xs:element name=”VIEWUSERID” msprop:OraDbType=”113″ type=”xs:long” minOccurs=”0″ />
<xs:element name=”CREATEDBYUSERID” msprop:OraDbType=”113″ type=”xs:long” minOccurs=”0″ />
<xs:element name=”NAME” msprop:OraDbType=”126″ type=”xs:string” minOccurs=”0″ />
<xs:element name=”VIEW_TYPE” msprop:OraDbType=”126″ type=”xs:string” minOccurs=”0″ />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<View>
<VIEW_ID>125</VIEW_ID>
<VIEW_NAME>HSBC</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-20T08:33:15-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>124</VIEW_ID>
<VIEW_NAME>Hazel Test</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-20T08:29:16-05:00</CREATED_DATE>
<VIEWUSERID>26915</VIEWUSERID>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Shared</VIEW_TYPE>
</View>
<View>
<VIEW_ID>79</VIEW_ID>
<VIEW_NAME>Jennifer J Contractors</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-26T10:06:00-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>102</VIEW_ID>
<VIEW_NAME>Jennifer ONS TEK</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-20T08:17:42-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>104</VIEW_ID>
<VIEW_NAME>Jennifer Y Contractors</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-26T09:03:04-05:00</CREATED_DATE>
<VIEWUSERID>26915</VIEWUSERID>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Shared</VIEW_TYPE>
</View>
<View>
<VIEW_ID>85</VIEW_ID>
<VIEW_NAME>Jennifer Z Contractors</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-18T10:08:22-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>121</VIEW_ID>
<VIEW_NAME>Test</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-20T08:12:49-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>123</VIEW_ID>
<VIEW_NAME>Test2</VIEW_NAME>
<EMPLID>04668172</EMPLID>
<CREATED_BY>JENJONES</CREATED_BY>
<CREATED_DATE>2014-02-20T08:34:11-05:00</CREATED_DATE>
<CREATEDBYUSERID>27239</CREATEDBYUSERID>
<NAME>Jones,Jennifer</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
<View>
<VIEW_ID>120</VIEW_ID>
<VIEW_NAME>test 2</VIEW_NAME>
<EMPLID>04444690</EMPLID>
<CREATED_BY>PPHULGER</CREATED_BY>
<CREATED_DATE>2014-02-20T05:22:52-05:00</CREATED_DATE>
<CREATEDBYUSERID>27240</CREATEDBYUSERID>
<NAME>Hulgeri,Praveen</NAME>
<VIEW_TYPE>Unused</VIEW_TYPE>
</View>
</NewDataSet>Hi Peter,
Any update on this?
Thanks
Moreover i have noticed that when any operation performs on the grid and grids rebinds the paging stops working unexpectedly and columns chopped off
-
AuthorPosts
You must be logged in to reply to this topic.