Iam using ASP.NET Ajax Q1 2008 Controls. Following is the scenario which we have encountered
We have 5 tabs with every tab having one grid each. Now on every post back in grid 1, all grids have there Individual events fired.
Requirement is to fire only the events of grid which is requested ie if user clicks on tab 3 only 3rd grid will load.
Following techniques were tried :-
1. We tried using AutoPostBack=true for radtabstrip and RenderSelectedPageOnly=true for Multipage but we were unable to acheive the requirement
2. We tried to capture the tab that has been clicked or selected but before we get the selected tab name, all individual events of all grid fire which is exactly what is not required.
Kindly help to acheive the solution to the above problem.
5 Answers, 1 is accepted
Could you please let me know which events exactly are fired for the Grids in the other tabs? Pleas note that on postback on any Grid the ItemCreated and Grid PreRender events for all the Grids will also fire and this is expected.
Greetings,
Maria Ilieva
the Telerik team
Hi,
Following are the events which exactly are fired for the Grids in the other tabs
1.
- CreateColumnEditor
- ItemCreated
- PreRender
Since we have following code in PreRender Event, we want the only Selected Tab Grid to load.
Dim Count As Integer = CType(gvAddress.MasterTableView.Items.Count, Integer)
If Count = 0 Then
If Not gvAddress.DataSource Is Nothing Then
If CType(gvAddress.DataSource, DataTable).Rows.Count > 0 Then
gvAddress.CurrentPageIndex = gvAddress.CurrentPageIndex - 1
gvAddress.Rebind()
End If
End If
End If
Is there any wayout where we can load only Selected Tab Gridwithout firing of other events of nonselected grid.
Kindly let us know about RADCOMPRESSION, can it be helpful for us in order to optimise performance of our webapplication.
Kindly help us on this
Please check this online example which demonstrates how the pageviews can be loaded on demand.
Give it a try and let me know if it works for you.
All the best,
Pavlina
the Telerik team
Hi,
Thanks for your prompt treply.i tried implementing the below code, but the below code never executes.Private Sub AddPageView(ByVal pageViewID As String)
Dim pageView As New RadPageView()
pageView.ID = pageViewID
RadMultiPage1.PageViews.Add(pageView)
End Sub
Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick
AddPageView(e.Tab.Text)
e.Tab.PageView.Selected = True
End Sub
We tried setting autopostback true for Tabstrip, but then also code got never executed.
1. Kindly let us know if we are we missing something for the above problem
2. Since the example invloves User controls, in my scenrio we have 5 grids in 5 different tabs on same page.Kindly let us know how to move further with this.
It is hard to say what is causing the described issue without having the running application and reproduce the issue. Could you please send us a simple working application with reproduce this erroneous behavior. You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to we debug the project and provide you with more to-the-point answer.
Looking forward for your reply.
Kind regards,
Pavlina
the Telerik team