or
<telerik:RadGrid ID="genericGrid" runat="server" AutoGenerateColumns="false" AllowAutomaticDeletes="false" AllowSorting="true" AllowAutomaticInserts="false" AllowAutomaticUpdates="true" OnDataBound="DataBoundGenericGrid" AllowCustomPaging="true" PageSize="100" AllowPaging="True" AutoGenerateEditColumn="true" AllowFilteringByColumn="true" AllowMultiRowSelection="true" OnUpdateCommand="ItemUpdatedEvent" OnCancelCommand="ItemCanceledHandler" OnInsertCommand="ItemInsertedEvent" OnEditCommand="ItemEditHandler" OnItemDataBound="ItemDataBoundEvent" OnNeedDataSource="GridNeedDataSource" Style="height: 600; width: 100%"> <ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true"> <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> <MasterTableView AutoGenerateColumns="true" AllowAutomaticDeletes="false" AllowFilteringByColumn="true" AllowAutomaticInserts="false" AllowAutomaticUpdates="true" GridLines="Vertical" TableLayout="Fixed" GroupLoadMode="Client" EditMode="InPlace" /></telerik:RadGrid>genericGrid.DataSource = table.DefaultView;foreach (var gridColumn in _gridColumns) { genericGrid.Columns.Add(gridColumn); } genericGrid.DataSource = table.DefaultView;var dropDownColumn = new GridDateTimeColumn() { DataField = tableDefDto.ColumnId };
Hello,
I have the following code which declares a radwindow in BasePage class, its works fine in aspx pages, but I can't use it in User Controls and Master Pages:
string BaseRadWindowID { get { return "UniqueBaseRadWindowID"; } } RadWindow window = new RadWindow();// Create a enw Window RadWindow BaseRadWindow { get { return window; } } protected override void OnInit(EventArgs e) { this.window = new RadWindow();// Create a enw Window window.ID = BaseRadWindowID;// the id of the RadWindow; this.Form.Controls.Add(window);// Add it to the page base.OnInit(e); } public void ShowBaseRadWindow(bool visibleOnPageLoad, string navigationUrlQueryString) { BaseRadWindow.Width = Unit.Pixel(450); BaseRadWindow.Height = Unit.Pixel(150); BaseRadWindow.VisibleOnPageLoad = true; BaseRadWindow.VisibleStatusbar = true; BaseRadWindow.ReloadOnShow = true; BaseRadWindow.Modal = true; BaseRadWindow.Behaviors = WindowBehaviors.Close; BaseRadWindow.Style.Add("z-index", "10000"); BaseRadWindow.NavigateUrl = "~/Pages/Messages/Default.aspx" + navigationUrlQueryString; BaseRadWindow.VisibleOnPageLoad = visibleOnPageLoad; }I call the window in the aspx pages in this way:
this.ShowBaseRadWindow(true, string.Empty);Please, I need your help in order to call the window and show it in User Controls and Master Pages.
It is very appreciated to send me the modified code.
Regards,
Bader
<telerik:RadWindow ID="RadDeploymentWindow" Title="<%$ Resources:Text, DeploymentWizard %>" runat="server" VisibleOnPageLoad="false" VisibleStatusbar="false" Width="535px" Modal="true" Height="350px" Behaviors="Close,Move,Maximize,Reload " Skin="Windows7" IconUrl="~/Images/icons/Enterprise.png"> <ContentTemplate><telerik:RadGrid ID="DeploymentGrid" Skin="Office2007" runat="server" AutoGenerateColumns="False" AllowSorting="True" PageSize="10" ShowStatusBar="True" CellSpacing="0" GridLines="Both" AllowPaging="True" OnNeedDataSource="RadGrid_NeedDataSource" Height="225px" Width="516px"> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings> <ExportSettings IgnorePaging="true" ExportOnlyData="true" OpenInNewWindow="true" HideStructureColumns="true" Excel-Format="Html" FileName="ErrorsAndWarnings"> </ExportSettings> <MasterTableView DataKeyNames="ObjectID" AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false"> <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" /> <ItemStyle Wrap="false" /> <Columns> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ObjectID" HeaderText="ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ObjectType" HeaderText="Type"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Name" HeaderText="Name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Attribute" HeaderText="Attribute"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Error" HeaderText="Description"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ProposedSoluation" HeaderText="Proposed Solution"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Severity" HeaderText="Severity"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Resizing AllowColumnResize="True"></Resizing> </ClientSettings> </telerik:RadGrid>