This is a migrated thread and some comments may be shown as answers.

[Solved] How To Implement Paging on Gird using Silder Mode

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ranganath
Top achievements
Rank 1
Ranganath asked on 12 Jun 2008, 01:10 PM

HI ,

I tried following code to implement paging Concept.

Aspx:-

<div>

   

        <!-- content start -->

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

            <AjaxSettings>

                <telerik:AjaxSetting AjaxControlID="RadGrid1">

                    <UpdatedControls>

                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />

                    </UpdatedControls>

                </telerik:AjaxSetting>

                <telerik:AjaxSetting AjaxControlID="rcbPagerMode">

                    <UpdatedControls>

                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />

                        <telerik:AjaxUpdatedControl ControlID="rcbPagerMode" />

                    </UpdatedControls>

                </telerik:AjaxSetting>

            </AjaxSettings>

        </telerik:RadAjaxManager>

<!----->

   

        <telerik:RadComboBox ID="RadComboBox1" Runat="server" Skin="Telerik">

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

        </telerik:RadComboBox>

   

        <telerik:RadGrid ID="RadGrid1" Skin="WebBlue" runat="server" AllowPaging="True" AllowCustomPaging="True"

            PageSize="10" onneeddatasource="RadGrid1_NeedDataSource" >

            <MasterTableView VirtualItemCount="100" />

            <PagerStyle Mode="Slider"></PagerStyle>

        </telerik:RadGrid>

 

   

    </div>

Aspx.cs:-

protected void Page_Load(object sender, EventArgs e)

    {

        SqlConnection con = new SqlConnection("server=.;database=Pubs;trusted_connection=true");

        SqlDataAdapter dap = new SqlDataAdapter("select * from authors", con);

        DataSet ds = new DataSet();

        dap.Fill(ds, "authors");

this.RadGrid1.DataSource = ds.Tables[0];

        this.RadGrid1.DataBind();

 

    }

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

    {

       

    }

Please guide me to Implemet paging with above example…

 

Thanks,

Ranganath.S

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Jun 2008, 07:14 AM
Hi,

Try binding the Grid in the NeedDataSource event. Go through the online demo for getting more information about AdvanceDataBinding techniques.
Advanced data-binding

Thanks
Shinu.
Tags
Grid
Asked by
Ranganath
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or