
CONTEXT:
I have a "container" page called "Solutions.aspx" in which I need to add tabs (controls) with RadTabStrip and RadMultiPage.
Solutions.aspx
| <tr> |
| <td colspan="2"> |
| <div> |
| <telerik:RadTabStrip ID="RadTabStripSolution" SelectedIndex="0" runat="server" MultiPageID="RadMultiPageSolution" |
| Skin="WebBlue" OnTabClick="RadTabStripSolution_TabClick"> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPageSolution" runat="server" SelectedIndex="0" |
| OnPageViewCreated="RadMultiPageSolution_PageViewCreated" BorderWidth="1"> |
| </telerik:RadMultiPage> |
| </div> |
| </td> |
| </tr> |
Solutions.aspx.cs
| protected void Page_Load(object sender, EventArgs e) |
| { |
| //Get variables |
| loggedUser = (UserDTO)HttpContext.Current.Session["user"]; |
| if (Request.QueryString["RetirementID"] != null) |
| randaID = int.Parse(Request.QueryString["RetirementID"]); |
| if (!Page.IsPostBack) |
| { |
| RetirementDTO retirement = new RetirementController().GetRetirementAllTabs(randaID); |
| WorkflowDTO wfRetirement = new WorkflowActions().ShowTabsLoad(loggedUser, retirement); |
| if (wfRetirement != null) |
| { |
| int count = 0; |
| foreach (WorkflowTabDTO wfTab in wfRetirement.Tabs) |
| { |
| AddTab(wfTab); |
| if (wfTab.Selected) |
| { |
| RadTab tab = new RadTab(wfTab.TabName, wfTab.TabId.ToString()); |
| if(count <=0) |
| AddPageView(tab); |
| } |
| count++; |
| } |
| } |
| if (wfRetirement.Retirement != null) |
| { |
| // Retirement is locked |
| if (wfRetirement.Retirement.Edited) |
| { |
| //Add session "edit" -> true, edit mode |
| if (HttpContext.Current.Session["edit"] != null |
| && !HttpContext.Current.Session["edit"].ToString().Equals(string.Empty)) |
| { |
| HttpContext.Current.Session.Remove("edit"); |
| } |
| HttpContext.Current.Session.Add("edit", true); |
| } |
| else |
| { |
| //Alert |
| this.AlertEditPermission.Text = GetGlobalResourceObject("RANDAGlobalResource", "readPermissionAlert").ToString(); |
| this.PlaceHolderAlertEdit.Visible = true; |
| //Add session "edit" -> false, view mode |
| HttpContext.Current.Session.Add("edit", false); |
| } |
| } |
| } |
| protected void RadMultiPageSolution_PageViewCreated(object sender, RadMultiPageEventArgs e) |
| { |
| string userControlName = "../controls/" + e.PageView.ID + ".ascx"; |
| //Control userControl = Page.FindControl(userControlName); |
| Control userControl = Page.LoadControl(userControlName); |
| //if (userControl == null) |
| // userControl = Page.LoadControl(userControlName); |
| userControl.ID = e.PageView.ID + "_userControl"; |
| if (e.PageView.FindControl(userControl.ID) == null) |
| { |
| e.PageView.Controls.Add(userControl); |
| } |
| } |
| protected void RadTabStripSolution_TabClick(object sender, RadTabStripEventArgs e) |
| { |
| if (this.RadMultiPageSolution.FindPageViewByID(e.Tab.Text) == null) |
| AddPageView(e.Tab); |
| e.Tab.PageView.Selected = true; |
| } |
| private void AddTab(WorkflowTabDTO tabWf) |
| { |
| RadTab tab = new RadTab(tabWf.TabName, tabWf.TabId.ToString()); |
| tab.Enabled = tabWf.Enable; |
| tab.Selected = tabWf.Selected; |
| RadTabStripSolution.Tabs.Add(tab); |
| } |
| private void AddPageView(RadTab tab) |
| { |
| RadPageView pageViewCustom = new RadPageView(); |
| pageViewCustom.ID = tab.Text; |
| if (this.RadMultiPageSolution.FindPageViewByID(tab.Text) == null) |
| //if (this.RadMultiPageSolution.FindControl(pageViewCustom.ID) == null) |
| { |
| this.RadMultiPageSolution.PageViews.Add(pageViewCustom); |
| } |
| else |
| { |
| this.RadMultiPageSolution.PageViews.Remove(pageViewCustom); |
| this.RadMultiPageSolution.PageViews.Add(pageViewCustom); |
| } |
| //pageViewCustom.Enabled = tabWf.Enable; |
| tab.PageViewID = pageViewCustom.ID; |
| pageViewCustom.Selected = true; |
Controls:
- Register.ascx
- Research.ascx
- Agreement.ascx
- PeriodicReview.ascx
- Completion.ascx
- Administration.ascx
Example of Register.ascx:
| protected void nextButton_Click(object sender, EventArgs e) |
| { |
| RetirementDTO ret = new RetirementController().GetRetirementAllTabs(randaId); |
| //Get the next Tab and give it the control |
| WorkflowTabDTO wfTab = new WorkflowActions().NextTab(ret, (int)TabEnum.REGISTER); |
| if (edit) |
| { |
| if (SaveData()) |
| { |
| UpdateLastTabModified((int)TabEnum.REGISTER); |
| GoToNextTab(wfTab); |
| GoToNextPageView(wfTab); |
| } |
| } |
| else |
| { |
| GoToNextTab(wfTab); |
| GoToNextPageView(wfTab); |
| } |
| } |
| private void GoToNextTab(WorkflowTabDTO tab) |
| { |
| //Enable and select the next tab |
| RadTabStrip tabStrip = (RadTabStrip)Page.Master.FindControl("ContentPlaceHolder").FindControl("RadTabStripSolution"); |
| RadTab nextTab = tabStrip.FindTabByText(tab.TabName); |
| nextTab.Enabled = tab.Enable; |
| nextTab.Selected = tab.Selected; |
| } |
| /// <summary> |
| /// Go to next page |
| /// </summary> |
| private void GoToNextPageView(WorkflowTabDTO tab) |
| { |
| //Go to next page |
| RadMultiPage multiPage = (RadMultiPage)Page.Master.FindControl("ContentPlaceHolder").FindControl("RadMultiPageSolution"); |
| RadPageView nextPageView = multiPage.FindPageViewByID(tab.TabName); |
| if (nextPageView == null) |
| { |
| nextPageView = new RadPageView(); |
| nextPageView.ID = tab.TabName; |
| multiPage.PageViews.Add(nextPageView); |
| } |
| nextPageView.Selected = true; |
| } |
First at all, I add all tabs (enable or not according to bussiness rule) and I select one of them as (tab.Selected = true).
When tabs are enable, I can click on all of them and see them
I can move between tabs in two ways:
1º) Clicking into the Tab
2º) Press the "SAVE&NEXT" button
To set enable next tab and display it, I need to press "Save&Next" button and I need to Add into pageView the new Tab and load it.
Attached: code files and screenshot of example.
ISSUE/PROBLEM:
When I try to pass from one tab (for example: RegisterTAB) to next tab (for example: ResearchTAB) on clicking on the Tab:
- I can't load data into new selected TAB
When I press "Save&Next" Button:
- Next tab is not selected and data isn't loaded.
SUMMARY:
- New Tab is not selected
- Data is not loaded
- I can't see Radalert launch from Controls
- When tab is changed, RadDecorator doesn't work (example: Buttons)
See attached file.
Please, I need to resolve these issues as soon as possible.
Thanks in advance.
Lorena

| <%@ Page Title="" Language="VB" MasterPageFile="~/NewStims/mpStims.master" AutoEventWireup="false" |
| CodeFile="BigCalendar.aspx.vb" Inherits="NewStims_Events_BigCalendar" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> |
| <link href="Scheduler.Seths.css" rel="stylesheet" type="text/css" /> |
| <telerik:RadScheduler ID="scEvents" runat="server" Width="900px" Skin="Seths" |
| SelectedView="TimelineView" EnableEmbeddedSkins="False" CustomAttributeNames="EventStartDate, EventEndDate" |
| EnableCustomAttributeEditing="true" DataKeyField="EventID" DataSubjectField="EventTitle" |
| DataStartField="EventStartDate" FirstDayOfWeek="Monday" CssClass="slotClass" ShowDateHeaders="true" ShowHeader="true" |
| ShowNavigationPane="true" ShowViewTabs="true" LastDayOfWeek="Friday" DataEndField="EventEndDAte" OverflowBehavior="Expand" |
| ShowFooter="false" BackColor="Transparent" > |
| <TimelineView SlotDuration="2" NumberOfSlots="183" /> |
| <AppointmentTemplate> |
| <div class="divWrap"> |
| <%#CType(Eval("EventStartDate"), Date).Day.ToString()%> |
| </div> |
| <div style="width:70%;float:left"> |
| <%#Eval("Subject")%> |
| </div> |
| <div class="divWrap"> |
| <%#CType(Eval("EventEndDate"), Date).Day.ToString()%> |
| </div> |
| </AppointmentTemplate> |
| </telerik:RadScheduler> |
| <telerik:RadGrid ID="RadGrid1" runat="server" |
| AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" |
| AutoGenerateColumns="False" |
| DataSourceID="SqlDataSourceInbox" GridLines="None" |
| Height="360px" onitemcommand="RadGrid1_ItemCommand" |
| onitemdatabound="RadGrid1_ItemDataBound" |
| onselectedindexchanged="RadGrid1_SelectedIndexChanged" ShowGroupPanel="True" |
| Skin="Office2007" Width="725px" |
| ondeletecommand="RadGrid1_DeleteCommand" ImagesPath="/Skins/Office2007/Grid"> |
| <PagerStyle Mode="NextPrevAndNumeric" FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif" |
| LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif" |
| NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif" |
| PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /><mastertableview allowmulticolumnsorting="True" |
| datasourceid="SqlDataSourceInbox" tablelayout="Fixed" width="724px"> |
| <CommandItemSettings AddNewRecordImageUrl="/Skins/Office2007/Grid\AddRecord.gif" |
| ExportToCsvImageUrl="/Skins/Office2007/Grid\ExportToCsv.gif" |
| ExportToExcelImageUrl="/Skins/Office2007/Grid\ExportToExcel.gif" |
| ExportToPdfImageUrl="/Skins/Office2007/Grid\ExportToPdf.gif" |
| ExportToWordImageUrl="/Skins/Office2007/Grid\ExportToWord.gif" |
| RefreshImageUrl="/Skins/Office2007/Grid\Refresh.gif" /> |
| <RowIndicatorColumn FilterImageUrl="/Skins/Office2007/Grid\Filter.gif" |
| SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif" |
| SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif"> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn CollapseImageUrl="/Skins/Office2007/Grid\SingleMinus.gif" |
| ExpandImageUrl="/Skins/Office2007/Grid\SinglePlus.gif" |
| FilterImageUrl="/Skins/Office2007/Grid\Filter.gif" |
| SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif" |
| SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif"> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridClientSelectColumn Reorderable="False" |
| UniqueName="ClientSelectColumn"> |
| <HeaderStyle Width="20px" /> |
| </telerik:GridClientSelectColumn> |
| <telerik:GridTemplateColumn Groupable="False" UniqueName="TemplateColumn1"> |
| <HeaderStyle Width="20px" /> |
| <ItemStyle Height="35px" HorizontalAlign="Center" /> |
| <ItemTemplate> |
| <img alt="MailIcon" src="images/MailIcon.gif" |
| style="margin-bottom: 10px; margin-left: 2px" /> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn GroupByExpression="SentBy" |
| HeaderText="From / Subject" SortExpression="SentBy" |
| UniqueName="TemplateColumn2"> |
| <HeaderStyle Width="150px" /> |
| <ItemStyle Height="30px" Width="150px" /> |
| <ItemTemplate> |
| <%# DataBinder.Eval(Container.DataItem, "SentBy") %> |
| <br /> |
| <div class="MailSubject"> |
| <%# DataBinder.Eval(Container.DataItem, "Subject") %> |
| </div> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="ReceivedShort" DataFormatString="{0:d}" |
| HeaderText="Received" SortExpression="Received" UniqueName="ReceivedShort"> |
| <HeaderStyle Width="40px" /> |
| <ItemStyle Width="40px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AttachmentName" HeaderText="AttachmentName" |
| SortExpression="AttachmentName" UniqueName="AttachmentName"> |
| <HeaderStyle Width="60px" /> |
| <ItemStyle Width="60px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Message" DefaultInsertValue="" |
| HeaderText="Message" UniqueName="Message" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AttachmentPath" DefaultInsertValue="" |
| HeaderText="AttachmentPath" SortExpression="AttachmentPath" |
| UniqueName="AttachmentPath" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AttachmentType" DefaultInsertValue="" |
| HeaderText="AttachmentType" SortExpression="AttachmentType" |
| UniqueName="AttachmentType" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AttachmentSize" DefaultInsertValue="" |
| GroupByExpression="AttachmentSize" HeaderText="AttachmentSize" |
| UniqueName="AttachmentSize" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="SentBy" DefaultInsertValue="" |
| HeaderText="SentBy" SortExpression="SentBy" UniqueName="SentBy" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Subject" DefaultInsertValue="" |
| HeaderText="Subject" SortExpression="Subject" UniqueName="Subject" |
| Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="SentTo" DefaultInsertValue="" |
| HeaderText="SentTo" SortExpression="SentTo" UniqueName="SentTo" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Received" DefaultInsertValue="" |
| HeaderText="Received" SortExpression="Received" UniqueName="Received" |
| Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="LastRead" DefaultInsertValue="" |
| EmptyDataText="" HeaderText="LastRead" SortExpression="LastRead" |
| UniqueName="LastRead" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" |
| ConfirmText="Are you sure you want to delete this email?" |
| HeaderStyle-Width="35px" ImageUrl="/Skins/Office2007/Grid/Delete.gif" |
| Text="Delete" UniqueName="DeleteColumn"> |
| <HeaderStyle Width="35px" /> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <groupbyexpressions> |
| <telerik:GridGroupByExpression> |
| <selectfields> |
| <telerik:GridGroupByField FieldAlias="ReceivedShort" FieldName="ReceivedShort" |
| FormatString="{0:d}" HeaderText="Received" |
| HeaderValueSeparator=" from date: " /></selectfields> |
| <groupbyfields> |
| <telerik:GridGroupByField FieldName="ReceivedShort" FormatString="" |
| HeaderText="Received" SortOrder="Descending" /></groupbyfields></telerik:GridGroupByExpression></groupbyexpressions> |
| <EditFormSettings> |
| <EditColumn CancelImageUrl="/Skins/Office2007/Grid\Cancel.gif" |
| EditImageUrl="/Skins/Office2007/Grid\Edit.gif" |
| FilterImageUrl="/Skins/Office2007/Grid\Filter.gif" |
| InsertImageUrl="/Skins/Office2007/Grid\Update.gif" |
| SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif" |
| SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif" |
| UpdateImageUrl="/Skins/Office2007/Grid\Update.gif"> |
| </EditColumn> |
| </EditFormSettings> |
| <PagerStyle FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif" |
| LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif" |
| NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif" |
| PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /> |
| </mastertableview> |
| <groupingsettings showungroupbutton="True" /> |
| <GroupPanel CssClass="RadGrid_Office2007"> |
| </GroupPanel> |
| <clientsettings allowdragtogroup="True" enablepostbackonrowclick="true"><selecting |
| allowrowselect="True" /><scrolling allowscroll="True" scrollheight="275px" |
| usestaticheaders="True" /> |
| <clientmessages dragtogrouporreorder="Drag to group" /></clientsettings></telerik:RadGrid> |

Hi every one,
I am using telerik:GridButtonColumn it's working on Mozila firefox but does not work on chrome, when I click on gridbuttoncolumn it throws an error mention below:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
aspx code:
<telerik:RadFormDecorator ID="blueMapsFormDecorator" runat="server" DecoratedControls="all"
Skin="Web20"></telerik:RadFormDecorator>
<telerik:RadGrid AutoGenerateColumns="False" ID="gdListAccountDeactivate" AllowFilteringByColumn="true"
Width="100%" AllowPaging="True" AllowSorting="True" AllowRowSelect="true" runat="server"
OnItemCommand="gdListAccountDeactivate_ItemCommand">
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<PagerStyle Mode="NextPrevAndNumeric" />
<GroupingSettings CaseSensitive="false" />
<MasterTableView TableLayout="Fixed">
<Columns>
<telerik:GridBoundColumn HeaderText="EmailID" DataField="emailID" ItemStyle-Width="200px"
SortExpression="emailID" HeaderStyle-Width="200px" FilterControlWidth="180px"
AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />
<telerik:GridButtonColumn ConfirmText="Deactivate this User?" ConfirmDialogType="RadWindow" HeaderStyle-HorizontalAlign="Center"
ConfirmTitle="Deactivate" ButtonType="ImageButton" ImageUrl="~/images/delete.gif" CommandName="Deactivate" Text="Deactivate"
UniqueName="DeleteColumn" HeaderText="Deactivate" ItemStyle-Width="50px" HeaderStyle-Width="50px">
<itemstyle horizontalalign="Center" cssclass="MyImageButton" />
</telerik:GridButtonColumn>
<telerik:GridTemplateColumn UniqueName="appuserid" AllowFiltering="false" AutoPostBackOnFilter="false" ItemStyle-Width="50px" HeaderStyle-Width="50px" >
<ItemTemplate>
<telerik:RadTextBox Visible="false" ID="appUser" runat="server" Text='<%# Bind("appuserid") %>'>
</telerik:RadTextBox>
<asp:LinkButton ID="LinkButton2" Width="50px" CommandName="Redirect"
Text="Portfolio" runat="server"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid><br />
<telerik:RadWindowManager ID="RadWindowManager2" runat="server"></telerik:RadWindowManager>
aspx.cs code:
protected void gdListAccountDeactivate_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "Redirect")
{
GridDataItem item = (GridDataItem)e.Item;
string ID = (item.FindControl("appUser") as RadTextBox).Text;
string url = "Portfolio.aspx?ID=" + Security.QueryStringEncode(ID);
Response.Redirect(url);
}
if (e.CommandName == "Deactivate")
{
GridDataItem item = (GridDataItem)e.Item;
string appID = (item.FindControl("appUser") as RadTextBox).Text;
int appuserid = Convert.ToInt32(appID);
int lastupdatedby = Convert.ToInt32(Session["appuserid"]);
Member objMember = new Member();
objMember.DeactivateAccount(appuserid, lastupdatedby);
BindGrid();
}
}
public void BindGrid()
{
int ImplementationID = 0;
if (Session["ImplementationID"] == "")
{
ImplementationID = 0;
ds = objAccount.FetchUser("Account Manager", ImplementationID);
}
if (ds.Tables[0].Rows.Count > 0)
{
gdListAccountDeactivate.DataSource = ds.Tables[0];
gdListAccountDeactivate.DataBind();
}
}
Thanks