help me
sarvani said:
tony said:
Hello,
Try first not to ovrewrite the default jqGrid ajax succes function.
The pagging, sorting and serching in your case is a server side job, so I recommend you to lookat your server side code.
Regards
Thank you tony
Here is my server code
1 public static s_GridResult GetDataTable(string _search, string nd, int rows, int page, string sidx,
1234567891011121314151617181920212223242526 <div class="sfcode">string sord, string FilePath, string Filter, string submenu)<br />{<br /><br />int startindex = (page - 1);<br />int endindex = page;<br />DataTable dt = xxxxxxxx;//returns datatable<br />s_GridResult result = new s_GridResult();<br />List<s> rowsadded = new List</s><s>();<br />int idx = 1;<br />foreach (DataRow row in dt.Rows)<br />{<br />s_RowData newrow = new s_RowData();<br />newrow.id = idx++;<br />newrow.cell = new string[4]; //total number of columns<br />newrow.cell[0] = row[0].ToString();<br />newrow.cell[1] = row[1].ToString();<br />newrow.cell[2] = row[2].ToString();<br />newrow.cell[3] = row[4].ToString();<br />rowsadded.Add(newrow);<br />}<br />result.rows = rowsadded.ToArray();<br />result.page = page;<br />result.total = dt.Rows.Count;<br />result.record = rowsadded.Count;<br />return result;<br />}</s></div>
1
1
1 Plzz Help me <img decoding="async" title="Frown" src="/blog/wp-content/forum-smileys/sf-frown.gif" alt="Frown" /></code><code>i'm new to jqgrid...:(
tony said:
Hello,
Try first not to ovrewrite the default jqGrid ajax succes function.
The pagging, sorting and serching in your case is a server side job, so I recommend you to lookat your server side code.
Regards
Thank you tony
Here is my server code
|
1 |
public static s_GridResult GetDataTable(string _search, string nd, int rows, int page, string sidx, |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<div class="sfcode">string sord, string FilePath, string Filter, string submenu)<br /> {<br /> <br /> int startindex = (page - 1);<br /> int endindex = page;<br /> DataTable dt = xxxxxxxx;//returns datatable<br /> s_GridResult result = new s_GridResult();<br /> List<s> rowsadded = new List</s><s>();<br /> int idx = 1;<br /> foreach (DataRow row in dt.Rows)<br /> {<br /> s_RowData newrow = new s_RowData();<br /> newrow.id = idx++;<br /> newrow.cell = new string[4]; //total number of columns<br /> newrow.cell[0] = row[0].ToString();<br /> newrow.cell[1] = row[1].ToString();<br /> newrow.cell[2] = row[2].ToString();<br /> newrow.cell[3] = row[4].ToString();<br /> rowsadded.Add(newrow);<br /> }<br /> result.rows = rowsadded.ToArray();<br /> result.page = page;<br /> result.total = dt.Rows.Count;<br /> result.record = rowsadded.Count;<br /> return result;<br /> }</s></div> |
|
1 |
<br /> |
|
1 |
<br /> |
|
1 |
Plzz Help me <img decoding="async" title="Frown" src="/blog/wp-content/forum-smileys/sf-frown.gif" alt="Frown" /> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top