| public class BaseGrid : Telerik.Web.UI.RadGrid |
| { |
| protected override void OnPreRender(EventArgs e) |
| { |
| this.AllowMultiRowEdit = false; |
| this.Skin = "Telerik"; |
| this.GridLines = GridLines.None; |
| this.MasterTableView.NoMasterRecordsText = "No records custom message!"; |
| // Call the base class's OnLoad method! |
| base.OnPreRender(e); |
| } |
This helps me to reduce the time whenever the Client wants to change the appearance of all grids in the application.
The Skin property works great, I mean, if I change the skin on the base class every grid will change its appearance too.
The problem is that I'm trying to localize the grid messages the same way. But the line :
this.MasterTableView.NoMasterRecordsText = "No records custom message!";
produces no effect, since I'm getting the default "No records to display." message.
Is this the best approach to localize every message in all the grids in my application? Does anybody knows why this isn't working?
Thanks!
Just installed the prometheus editor and works great, except that the size drop down, now just shows up as S... when the contents are blank, how do I set that to a number or make it wide enough to its not just an S...?
| <telerik:RadAjaxManager id="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadComboBox1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="trActions" /> |
| <telerik:AjaxUpdatedControl ControlID="trDocuments" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="lbCloseDocument"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="trActions" /> |
| <telerik:AjaxUpdatedControl ControlID="trDocuments" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="215px" Skin="Outlook"> |
| <ItemTemplate> |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" Height="200" OnNodeClick="RadTreeView1_NodeClick"> |
| <Nodes> |
| <telerik:RadTreeNode runat="Server" Text="First Doc" Value="/files/First.pdf" /> |
| <telerik:RadTreeNode runat="Server" Text="Second Doc" Value="/files/Second.pdf" /> |
| <telerik:RadTreeNode runat="Server" Text="Third Doc" Value="/files/Third.pdf" /> |
| <telerik:RadTreeNode runat="Server" Text="Category 1"> |
| <Nodes> |
| <telerik:RadTreeNode runat="Server" Text="Doc 1" /> |
| <telerik:RadTreeNode runat="Server" Text="Doc 2" /> |
| <telerik:RadTreeNode runat="Server" Text="Doc 3" /> |
| </Nodes> |
| </telerik:RadTreeNode> |
| <telerik:RadTreeNode runat="Server" Text="Category 2"> |
| <Nodes> |
| <telerik:RadTreeNode runat="Server" Text="Doc 4" /> |
| <telerik:RadTreeNode runat="Server" Text="Doc 5" /> |
| <telerik:RadTreeNode runat="Server" Text="Doc 6" /> |
| </Nodes> |
| </telerik:RadTreeNode> |
| </Nodes> |
| </telerik:RadTreeView> |
| </ItemTemplate> |
| <Items> |
| <telerik:RadComboBoxItem Text="" /> |
| </Items> |
| </telerik:RadComboBox> |

<
table width="99%" cellspacing="0" cellpadding="0" border="0" style="border-spacing:0; border:0; height:15" >
<tr style="border-spacing:0; border:0">
<td>
<csla:CslaDataSource ID="dsCollateralList" runat="server" TypeName="WVFacts.CPS.Intake"
TypeAssemblyName="WVFacts.CPS.Intake.GnrlColtrlList" OnSelectObject="dsCollateralList_SelectObject">
</csla:CslaDataSource>
<facts:FACTSGrid ID="dgrdColtrl" runat="server" DataSourceID="dsCollateralList"
GridLines="None" Height="120px" ShowGroupPanel="True" CellSpacing="0" AllowSorting="True"
OnPreRender="SelectRow" CellPadding="0" OnGroupsChanging="dgrdColtrl_GroupChange"
OnItemCommand="dgrdColtrl_ItemCommand" AutoGenerateColumns="False"
>
<clientsettings reordercolumnsonclient="True" allowcolumnhide="True"
enablepostbackonrowclick="True" allowdragtogroup="True">
<Scrolling UseStaticHeaders="True" AllowScroll="True" ScrollHeight="80px"></Scrolling>
<Selecting AllowRowSelect="True" />
<ClientEvents OnGridCreated="ScrollToRow" />
<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True">
</Resizing>
</clientsettings>
<mastertableview datasourceid="dsCollateralList" datakeynames="CollateralId" AllowNaturalSort="true"
allowcustompaging="True" pagesize="20" AllowMultiColumnSorting="true">
<Columns>
<radG:GridBoundColumn DataField="CollateralId" UniqueName="CollateralId"
HeaderText="Id" visible="true" HeaderStyle-Width="70">
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="CollateralName" SortExpression="CollateralName" HeaderText="Name"
UniqueName="CollateralName">
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="RelationDescription" SortExpression="RelationDescription"
HeaderText="Relationship" UniqueName="RelationDescription">
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="FormattedHomePhone" SortExpression="FormattedHomePhone"
HeaderText="Home Phone" UniqueName="FormattedHomePhone" HeaderStyle-Width="120">
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="FormattedBussinessPhone" SortExpression="FormattedBussinessPhone"
HeaderText="Business Phone" UniqueName="FormattedBussinessPhone" HeaderStyle-Width="120">
</radG:GridBoundColumn>
</Columns>
<ExpandCollapseColumn Visible="False">
<HeaderStyle Width="19px" />
</ExpandCollapseColumn>
<RowIndicatorColumn Resizable="True">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
</mastertableview>
<grouppanel visible="True">
</grouppanel>
</facts:FACTSGrid>
</td>
</tr>
</table>