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

paging

1 Answer 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Toxic
Top achievements
Rank 1
Toxic asked on 28 Oct 2016, 09:45 AM

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();


 

 

1 Answer, 1 is accepted

Sort by
0
Misho
Telerik team
answered on 01 Nov 2016, 11:10 AM
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
Tags
Grid
Asked by
Toxic
Top achievements
Rank 1
Answers by
Misho
Telerik team
Share this question
or