Hello,
I would like to set OnNeedDataSource and OnFilterCheckListItemsRequested in C# and not in aspx.
When having this line in Default.aspx it all works fine:
<telerik:RadGrid ID="RadGrid2" runat="server" Width="750px" OnNeedDataSource="RadGrid2_NeedDataSource"
OnFilterCheckListItemsRequested="RadGrid2_FilterCheckListItemsRequested">
But I would like to get everything but ID and runat to Default.aspx.cs.
Like so:
RadGrid2.MasterTableView.DataKeyNames = new string[] { "ID" };
RadGrid2.AllowPaging = true;
RadGrid2.AllowSorting = true;
RadGrid2.GroupingEnabled = true;
RadGrid2.GroupPanelPosition = GridGroupPanelPosition.Top;
RadGrid2.AllowFilteringByColumn = true;
RadGrid2.FilterType = GridFilterType.HeaderContext;
RadGrid2.EnableHeaderContextMenu = true;
RadGrid2.EnableHeaderContextFilterMenu = true;
But when adding these:
RadGrid2.OnNeedDataSource
RadGrid2.OnFilterCheckListItemsRequested
I get an error saying these are inaccessible due to their protection level.
So how can I assign RadGrid2_NeedDataSource and RadGrid2_FilterCheckListItemsRequested in C#?