Hi,
I'm implementing Telerik radgrid in Sharepoint.
I use the NeedDataSource event to populate my grid. I get the data through linqtosql in the following manner:
I'm implementing Telerik radgrid in Sharepoint.
I use the NeedDataSource event to populate my grid. I get the data through linqtosql in the following manner:
RadGrid1.DataSource = handler.Find(); ->
| public IList<Company1.Grid.Data.DataTransferObjects.KravDTO> Find() |
| { |
| using (Company1LinqDSDataContext context = new Company1LinqDSDataContext()) |
| { |
| return (from k in context.Kravs |
| select new Company1.Grid.Data.DataTransferObjects.KravDTO() |
| { |
| Anr=k.anrr, |
| ID=k.ID, |
| Kund=k.Kund |
| }).ToList(); |
| } |
| } |
Hence the RadGrid is populated with an IList as datasource.
This works fine! However the filtering and paging functions only work once every refresh. E.g: Navigate to the page containing the RadGrid. Filter/change page or anything like that and the filtering and ability to change number of items per page stops working.
The paging itself (clicking the navigation) and sorting still works.
If i refresh the page the filtering and "number per page" function works again until the next action.
The only error message i get is: "'null' is null or not an object".
My .ascx code:
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadGrid ID="RadGrid1" Width="97%" |
| AllowPaging="True" PageSize="25" runat="server" AllowFilteringByColumn="True" AllowSorting="True" |
| OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="None"> |
| <MasterTableView Width="100%" /> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| </telerik:RadGrid> |
Any ideas?