Hi All,
I have an Ajax-ified page with six RadGrids. To avoid duplicate code the grid is in a usercontrol that get's loaded into six panels. The datasource for each grid is handled in the "main" page in code-behind.
Everything's working, except for paging. I believe I need to handle the NeedDataSource event, but I'm unsure where to do this.
Thx in advance for help and/or pointers!
Rgds - M.
Pseudocode (code behind)
Pseudocode (aspx)
I have an Ajax-ified page with six RadGrids. To avoid duplicate code the grid is in a usercontrol that get's loaded into six panels. The datasource for each grid is handled in the "main" page in code-behind.
Everything's working, except for paging. I believe I need to handle the NeedDataSource event, but I'm unsure where to do this.
Thx in advance for help and/or pointers!
Rgds - M.
Pseudocode (code behind)
// SqlConnection sqlconn = ......
// Dataset, fill etc ...
// Findcontrol grid in pnl1
grid1.Datasource = ds.Tables[0];
grid1.DataBind();
// Findcontrol grid in pnl2
grid2.Datasource = ds.Tables[1];
grid2.DataBind();
//etc
Pseudocode (aspx)
<
telerik:RadAjaxManager
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Execute"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl2"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnl3"
/>
.......
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
telerik:RadAjaxManager
>
<
asp:Panel
ID
=
"pnl1"
runat
=
"server"
Visible
=
"false"
>
<
uc:Grid
ID
=
"Grid1"
runat
=
"server"
/>
</
asp:Panel
>
<
asp:Panel
ID
=
"pnl2"
runat
=
"server"
Visible
=
"false"
>
<
uc:Grid
ID
=
"Grid2"
runat
=
"server"
/>
</
asp:Panel
>
...