paging

2 posts, 0 answers
  1. Toxic
    Toxic avatar
    3 posts
    Member since:
    Oct 2016

    Posted 28 Oct Link to this post

    hi guys,

     

    this was first a checkbox but I had to change it to a Grid.

    but the only problem is that the paging is not working... can you guys find the mistake?

    (I am a beginner)

     

                              <telerik:RadGrid ID="ChangedList" runat="server" AutoGenerateColumns="false" OnPageIndexChanged="ChangedList_PageIndexChanged" OnNeedDataSource="ChangedList_NeedDataSource" GridLines="None" AllowPaging="true" RenderMode="Lightweight" PageSize="5" AllowSorting="True">
                    <MasterTableView ClientDataKeyNames="Logging_ID" backcolor="PaleGreen"  ForeColor="black" BorderStyle="Solid" BorderColor="Green" AlternatingItemStyle-BackColor="MediumSeaGreen"   PagerStyle-BackColor ="LawnGreen"   HeaderStyle-ForeColor="green" HeaderStyle-BorderColor="Crimson">
                          
                        <Columns>

                            <telerik:GridCheckBoxColumn
                                HeaderText="Checkbox" >
                            </telerik:GridCheckBoxColumn>
                            <telerik:GridBoundColumn DataField="ModuleName" HeaderText="Naam"  UniqueName="ModuleName" ReadOnly="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AssemblyVersion" HeaderText="Versie" UniqueName="AssemblyVersion" ReadOnly="true">
                            </telerik:GridBoundColumn>

                            
                         
                        </Columns>
                    </MasterTableView>
                   
                </telerik:RadGrid>

     

     

    --------------------------------------------------------------------------------------------------------------

     

     

     protected void Page_Load(object sender, EventArgs e)
            {

      
              // CheckBoxList1.AutoPostBack = cbAutoRefresh.Checked;
                LogChanges();
                if (!IsPostBack)
                {
                    ddWebserver.DataSource = controller.Server_List();
                    ddWebserver.DataTextField = "Description";
                    ddWebserver.DataValueField = "Server_ID";

                    ddWebserver.DataBind();
                    ddWebserver.SelectedIndex = 0;
                    LoadListboxes();
                

                }

     

     

     

     

     protected void ChangedList_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
            {
               
            }

            
        

     

     

     



            protected void ChangedList_PageIndexChanged(object sender, GridPageChangedEventArgs e)
            {
                int index = e.NewPageIndex;
                int current = ChangedList.CurrentPageIndex;
            }
            private void LoadListboxes()
            {
                //CheckBoxList1.Items.Clear();
                CheckBoxList2.Items.Clear();



                var changes = controller.Logging_List().Where(x => x.Ignore == false).ToList().OrderBy(x => x.ModuleName);


                ChangedList.DataSource = changes;
                    ChangedList.DataBind();


     

     

  2. Misho
    Admin
    Misho avatar
    129 posts

    Posted 01 Nov Link to this post

    Hi,

    In case you are using the Kendo Grid component for ASP.NET Core (MVC) I would recommend you to use the following example as a reference:
    http://demos.telerik.com/aspnet-core/grid/paging
    The sample you have sent, however, shows that you use telerik:RadGrid which is the RadGrid control for ASP.NET AJAX (Webforms).
    You can use the following resources in this case, which might be relevant for RadGrid paging functionality:
    http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/paging/basic-paging/defaultcs.aspx

    I hope you will find this information useful.

    Regards,
    Misho
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Telerik UI for ASP.NET Core is out
Back to Top