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