Hello,
I'm using in my websites the RadGrid control alot (See the following code - only DataKeyNames, AddNewRecordText properties and the columns are different).
Can I save this template on an external file and load it in each time I want to use the control?
If it is possible, let me know how can I do that
Regards,
Bader
I'm using in my websites the RadGrid control alot (See the following code - only DataKeyNames, AddNewRecordText properties and the columns are different).
Can I save this template on an external file and load it in each time I want to use the control?
<telerik:RadGrid ID="MngRadGrid" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid" OnItemDataBound="MngRadGrid_ItemDataBound" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="MngRadGrid_PreRender" OnNeedDataSource="MngRadGrid_NeedDataSource" OnUpdateCommand="MngRadGrid_UpdateCommand" OnInsertCommand="MngRadGrid_InsertCommand" OnDeleteCommand="MngRadGrid_DeleteCommand" Width="780px"> <MasterTableView Width="780px" CommandItemDisplay="Top" Dir="LTR" DataKeyNames="UserID"> <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top" /> <CommandItemSettings RefreshText="Refresh" AddNewRecordText="Add New Record" /> <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" /> <HeaderStyle HorizontalAlign="Left" /> <Columns> <telerik:GridEditCommandColumn EditText="<%$ Resources:TelerikResource, RadGridEditColumnText %>" ItemStyle-Width="7%" UniqueName="EditCommandColumn1" > </telerik:GridEditCommandColumn> <telerik:GridBoundColumn UniqueName="UserID" HeaderText="User ID" ItemStyle-Width="7%" DataField="UserID"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsUserName %>" ItemStyle-Width="19%" > <ItemTemplate> <asp:Image ID="AvatarImage" ImageUrl='<%# "~/RL/Avatars/" + Eval("Avtr") %>' Width="40px" Height="40px" runat="server" /><br /> <asp:Label ID="ManagerNameDataLabel" SkinID="NormalText" runat="server" Text='<%# Eval("UserName") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="RolesNam" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsRoles %>" ItemStyle-Width="7%" > <ItemTemplate> <asp:Label ID="RolesDataLabel" SkinID="NormalText" runat="server" Text="..." ToolTip='<%# Eval("RolesNam") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="Email" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsEmail %>" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left" DataField="Email"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="LastEdit" HeaderText="Last Edit" ItemStyle-Width="26%" > <ItemTemplate> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td width="25"> <asp:Label ID="ByLabel" runat="server" SkinID="FieldNameLabel" Text="By:"></asp:Label> </td> <td width="*"> <asp:Label ID="LastEditedByNameDataLabel" SkinID="NormalText" runat="server" Text='<%# Eval("LastEditedByName") %>'></asp:Label> </td> </tr> <tr> <td width="25"> <asp:Label ID="DateLabel" runat="server" SkinID="FieldNameLabel" Text="Date:"></asp:Label> </td> <td width="*"> <asp:Label ID="DateDataLabel" runat="server" Text='<%# Eval("LastEditedDate") %>'></asp:Label> </td> </tr> </table> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridButtonColumn ConfirmText="<%$ Resources:TelerikResource, RadGridDeleteColumnConfirmText %>" ConfirmDialogType="RadWindow" ItemStyle-Width="7%" ConfirmTitle="<%$ Resources:TelerikResource, RadGridDeleteColumnConfirmTitle %>" ButtonType="ImageButton" CommandName="Delete" Text="<%$ Resources:TelerikResource, RadGridDeleteColumnText %>" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings UserControlName="SubUserControl.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid>If it is possible, let me know how can I do that
Regards,
Bader