Hi, I want something like
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/multipage/dynamic-pageview-creation/defaultcs.aspx
but I don't want to create any RadPageView in server-side way, but only use the RadPageViews already created client-side.
Until now, I have
a RadMultiPage with RenderSelectedPageOnly="true"
and in RadTabStrip AutoPostBack="true"
.... I totally want to avoid postbacks.
Is possible?
3 Answers, 1 is accepted
I have done something like this:
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
MultiPageID
=
"RadMultiPage1"
runat
=
"server"
AutoPostBack
=
"true"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Tab1"
Value
=
"1"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"Tab2"
Value
=
"2"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"Tab3"
Value
=
"3"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"true"
>
<
telerik:RadPageView
ID
=
"Tab1"
runat
=
"server"
>
<
telerik:RadGrid
ID
=
"RadGrid1"
RenderMode
=
"Lightweight"
ClientDataSourceID
=
"RadClientDataSource_RadGrid1"
... >
<
MasterTableView
>...</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadClientDataSource
ID
=
"RadClientDataSource_RadGrid1"
runat
=
"server"
>
<
ClientEvents
OnCustomParameter
=
"ParameterMap"
OnDataParse
=
"Parse"
OnRequestStart
=
"onRequestStart"
OnRequestEnd
=
"onRequestEnd"
/>
<
DataSource
>
<
WebServiceDataSourceSettings
BaseUrl
=
"../../../myWebService.svc/"
>
<
Select
Url
=
"GetStream1"
DataType
=
"JSON"
RequestType
=
"Post"
ContentType
=
"application/json; charset=utf-8"
EnableCaching
=
"false"
/>
</
WebServiceDataSourceSettings
>
</
DataSource
>
<
Schema
ResponseType
=
"JSON"
>
<
Model
>...</
Model
>
</
Schema
>
</
telerik:RadClientDataSource
>
</
telerik:RadPageView
>
...
<
telerik:RadPageView
ID
=
"Tab3"
runat
=
"server"
>
<
telerik:RadGrid
ID
=
"RadGrid3"
RenderMode
=
"Lightweight"
ClientDataSourceID
=
"RadClientDataSource_RadGrid3"
... >
<
MasterTableView
>...</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadClientDataSource
ID
=
"RadClientDataSource_RadGrid3"
runat
=
"server"
>
<
ClientEvents
OnCustomParameter
=
"ParameterMap"
OnDataParse
=
"Parse"
OnRequestStart
=
"onRequestStart"
OnRequestEnd
=
"onRequestEnd"
/>
<
DataSource
>
<
WebServiceDataSourceSettings
BaseUrl
=
"../../../myWebService.svc/"
>
<
Select
Url
=
"GetStream3"
DataType
=
"JSON"
RequestType
=
"Post"
ContentType
=
"application/json; charset=utf-8"
EnableCaching
=
"false"
/>
</
WebServiceDataSourceSettings
>
</
DataSource
>
<
Schema
ResponseType
=
"JSON"
>
<
Model
>...</
Model
>
</
Schema
>
</
telerik:RadClientDataSource
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
Now I succeeded in my attempt: now loads only the first tab (thanks to RenderSelectedPageOnly = 'true' in RadMultiPage1).
In addition, with AutoPostBack = 'true' in RadTabStrip1, and RadAjaxManager, can load other tab on demand.
But I think I have found a bug.
After viewing the first tab, I click on a second tab: everything goes well, the binding of my RadGrid is successful, all calls to JavaScript functions occurring successfully, the call to my web service is done ... everything ok. But at the end of the procedure it raises an exception that blocks the functioning of the entire page (see the attachment).
The demonstrated error, suggests that there is something wrong with the ClientDataSource. This is why, I would like to ask you to do the following steps:
- Place the implementation of the RadGrid with the associated ClientDataSoucre on a separate page, and evaluate whether the error still persist
- Demonstrate us the approach that you use at serve-side implementation that you are currently have
Regards,
Nencho
Telerik
1. The problem does not occur when I load the page, but only at the click of a tab, to switch from one RadPageView to another .
Thus, RadGrid and RadClientDataSource work well. Indeed, the interrogation to the web service (and visualization of data) is done successfully.
Moreover, if I set RenderSelectedPageOnly = "false" the problem doesn't exist. But in this way, different RadClientDataSource call the web service all together.
However, I suppose that RadGrids and RadClientDataSources work well.
2. Server-side I have nothing, my .aspx.cs is almost empty, I have just the Page_Load method (empty).
The logic is javascript side.