Hello!
I searched a while for this issue and can't seem to find. I have a multipage radtabstrip. When i click a radbutton in the first tab, i want the thrid one to open, load data, then trigger the insert command in the grid inside the 3rd tab.
Everything works from the moments i arrive in the load of my 3rd tab. My EventArguments still have what i sent from the first tab.
For the sake of showing my problem, here is how i do it from the javascript file:
Then, i have this in my third tab load function :
In my Third tab, i have a grid with a custom userControl for the edit form:
My Problem is, i need to pass some viewstate properties to the userControl. Normally i do this in the grid itemCreated() function when the item is type of GridEditFormInsertItem.
When i load the customUC, my properties is set, and i can use it. But, if i write IsItemInserted somewhere.... that variable is never set and my website crashes. I can't put the variable in the viewstate anywhere else, security issues, and thats how the website was made before i added this feature.
I hope my explanations were clear and someone might be able to answer me cause i really don't know what to do...
I searched a while for this issue and can't seem to find. I have a multipage radtabstrip. When i click a radbutton in the first tab, i want the thrid one to open, load data, then trigger the insert command in the grid inside the 3rd tab.
Everything works from the moments i arrive in the load of my 3rd tab. My EventArguments still have what i sent from the first tab.
For the sake of showing my problem, here is how i do it from the javascript file:
//Client side function called by my button in the first tab:triggerMyThridTab: function() { this._needToAdd = true; this._tabs.get_tabs().getTab(2).set_selected(true);}//.... calling the selected functiononTabSelected: function(sender, args){ if(this._needToAdd){ sender._userControl._needToAdd = true; sender._userControl._myThridTab.raise_load(); }}//In my thirdTab usercontrol load function....raise_load: function(){ if(this._needToAdd){ var myAction = "addNewEntry"; eval("var exec = function() { $find(window.idAjaxManager).ajaxRequestWithTarget('" + this._triggerUniqueID + "', '\\{ \\'Action\\':\\'" + myAction + "\\'}' ); }"); ExecRequeteAjax(this, exec, 5, null);//This calls the postback }}Then, i have this in my third tab load function :
'This is the userControl contained in the third tabPrivate Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If ValidateEventArguments() Then 'I must open the grid in insert mode MyGrid.MasterTableView.IsItemInserted = True MyGrid.Rebind() End IfEnd SubIn my Third tab, i have a grid with a custom userControl for the edit form:
<telerik:RadGrid ID="MyGrid" runat="server" > <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/MyAddItemCustomUC.ascx" /> <Columns>....</Columns></telerik:RadGrid>My Problem is, i need to pass some viewstate properties to the userControl. Normally i do this in the grid itemCreated() function when the item is type of GridEditFormInsertItem.
Protected Sub MyGrid_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles MyGrid.ItemCreated If TypeOf e.item Is GridEditFormInsertItem Then Dim control As MyCustomEditUC = DirectCast(e.Item.FindControl(GridEditFormInsertItem.EditFormUserControlID), MyCustomEditUC) control.SomePropreties = PropretiesInViewState End IfEnd SubWhen i load the customUC, my properties is set, and i can use it. But, if i write IsItemInserted somewhere.... that variable is never set and my website crashes. I can't put the variable in the viewstate anywhere else, security issues, and thats how the website was made before i added this feature.
I hope my explanations were clear and someone might be able to answer me cause i really don't know what to do...