The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

How to bind dataset to GridPanel with paging programatically??

  1. #1

    How to bind dataset to GridPanel with paging programatically??

    I already have a dataset from a method that i got number of rows and pagecount.
    I need 2 things;
    - I have the totalnumber of rows returned from my Stored Procedure. I need to set the page count of the GridPanel's pager programmatically.
    - How can i handle the event for the next and previous page button on the bottombar so i can run my SP again with the new pageindex.
    - When I click the column header for sorting, It only sorts the visible rows. I need to get a new DataSet according to the sort criteria. How can I trigger that?

    I'm pasting my current code below.
    I'll be glad if you can help me.

    <ext:Store ID="Store1" runat="server" AutoLoad="true" RemoteSort="true">
                <ext:Parameter Name="start" Value="={0}" />
                <ext:Parameter Name="limit" Value="10" />
                <ext:JsonReader ReaderID="id">
                        <ext:RecordField Name="GumrukAdi" />
        <ext:GridPanel runat="server" ID="GridPanel1" Title="Employees" Frame="true" StoreID="Store1" Height="300">
            <ColumnModel ID="ColumnModel1" runat="server">
                    <ext:Column DataIndex="GumrukAdi" Header="Gumruk Adi" Width="150" />
                <ext:GridView ID="GridView1" runat="server" EnableRowBody="true">
                    <GetRowClass Handler="rowParams.body = '<p>''</p>'; return 'x-grid3-row-expanded';" />
                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
            <LoadMask ShowMask="true" />

    int totalCount = 0; //Number of rows found
    int start = 0;
    int columnId= 1;
    int orderBy = 1;
    DataTable dtInfo = Database.GetEMployeeList(start,
                out totalCount).Tables[0];
    Store1.DataSource = dtInfo;
  2. #2

    RE: How to bind dataset to GridPanel with paging programatically??


    Please see the following sample

    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Replies: 3
    Last Post: Mar 19, 2013, 10:05 PM
  2. GridPanel with DataSet, where am I wrong?
    By MADSON in forum 1.x Help
    Replies: 4
    Last Post: Apr 08, 2012, 6:45 PM
  3. Replies: 2
    Last Post: Oct 06, 2011, 9:40 AM
  4. [CLOSED] Change heigth of gridpanel programatically in javascript
    By Pablo_Azevedo in forum 1.x Premium Help
    Replies: 5
    Last Post: Aug 12, 2011, 8:18 PM
  5. Replies: 2
    Last Post: Nov 17, 2009, 2:26 PM

Posting Permissions