or
<telerik:GridTemplateColumn
HeaderText="test" HeaderStyle-Width="50px" ItemStyle-Width="16px"
UniqueName="test" AllowFiltering="false">
<ItemTemplate>
<asp:Image ID="StatusImage" runat="server" Width="16px" Height="16px"/>
</ItemTemplate>
but I want to create it on server side.
How can I do that?
Thanks.
</telerik:GridTemplateColumn>
<tel:RadGrid ID="rgSearchResults" runat="server" AllowPaging="True" AllowSorting="True" CellSpacing="0" GridLines="None" OnItemCommand="rgSearchResults_ItemCommand" OnItemDataBound="rgSearchResults_ItemDataBound" AutoGenerateColumns="False"> <ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="false" EnablePostBackOnRowClick="true" /> <MasterTableView DataKeyNames="ID" AllowMultiColumnSorting="true"> <SortExpressions> <tel:GridSortExpression FieldName="Name" SortOrder="Ascending" /> <tel:GridSortExpression FieldName="SubBasin" SortOrder="Ascending" /> <tel:GridSortExpression FieldName="SubSubBasin" SortOrder="Ascending" /> </SortExpressions> <Columns> <tel:GridButtonColumn HeaderText="View" UniqueName="View" ButtonType="ImageButton" ImageUrl="~/Content/Images/edit.png" Text="View" CommandName="View" /> <tel:GridButtonColumn HeaderText="Select" UniqueName="SelectTroutParentWater" ButtonType="ImageButton" ImageUrl="~/Content/Images/edit.png" Text="Select" CommandName="SelectTroutParentWater" Visible="false" /> <tel:GridTemplateColumn HeaderText="Select" UniqueName="Select" Visible="false"> <ItemTemplate> <asp:CheckBox runat="server" ID="rgcbSelect" OnCheckedChanged="rgcbSelect_CheckChanged" /> </ItemTemplate> </tel:GridTemplateColumn> <tel:GridBoundColumn DataField="ID" UniqueName="ID" Display="False" /> <tel:GridBoundColumn DataField="Name" HeaderText="Water Name" /> <tel:GridBoundColumn DataField="Latitude" HeaderText="Latitude" /> <tel:GridBoundColumn DataField="Longitude" HeaderText="Longitude" /> <tel:GridBoundColumn DataField="SubBasin" HeaderText="Sub Basin" /> <tel:GridBoundColumn DataField="SubSubBasin" HeaderText="Sub Sub Basin" /> <tel:GridBoundColumn DataField="ReceivingWater" HeaderText="Receiving Water" /> <tel:GridBoundColumn DataField="RiverMile" HeaderText="River Mile of Entry" /> <tel:GridBoundColumn DataField="CountyName" HeaderText="County" /> <tel:GridBoundColumn DataField="WaterType" HeaderText="Water Type" /> <tel:GridBoundColumn DataField="TagName" HeaderText="Tags" /> </Columns> </MasterTableView> </tel:RadGrid><form id="form1" runat="server"><telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask="(###)-######"> </telerik:RadMaskedTextBox> <asp:RequiredFieldValidator Display="Dynamic" ID="MaskedTextBoxRequiredFieldValidator" runat="server" ErrorMessage="Please, enter a phone number." ControlToValidate="RadMaskedTextBox1"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator Display="Dynamic" ID="MaskedTextBoxRegularExpressionValidator" runat="server" ErrorMessage="Format is (###)-######" ControlToValidate="RadMaskedTextBox1" ValidationExpression="\(\d{3}\)-\d{6}" /> <asp:Button ID="Button1" runat="server" Text="Postback" OnClick="Button1_Click"> </asp:Button> <asp:Label ID="lblMessage" runat="server"></asp:Label> </form><telerik:RadComboBox ID="YearComboBox" Runat="server" Filter="StartsWith" Font-Size="Medium" Width="100px" Height="150px" DataTextField="Text" DataValueField="Value" DataSourceID="XmlDataSource1" ></telerik:RadComboBox> <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Common/year.xml"></asp:XmlDataSource>| function RequestStart() { |
| // the following Javascript code takes care of expanding the RadAjaxLoadingPanel |
| // to the full height of the page, if it is more than the browser window viewport |
| var loadingPanel = document.getElementById("<%= RadAjaxLoadingPanel1.ClientID %>"); |
| var pageHeight = document.documentElement.scrollHeight; |
| var viewportHeight = document.documentElement.clientHeight; |
| if (pageHeight > viewportHeight) { |
| loadingPanel.style.height = pageHeight + "px"; |
| } |
| // the following Javascript code takes care of centering the RadAjaxLoadingPanel |
| // background image, taking into consideration the scroll offset of the page content |
| var scrollTopOffset = document.documentElement.scrollTop; |
| var loadingImageHeight = 55; |
| loadingPanel.style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
| // workaround for RadAjaxLoadingPanel for ASP.NET - there are two elements with the same ID |
| // this is not needed with RadAjaxLoadingPanel for ASP.NET AJAX |
| if (loadingPanel.nextSibling.className == loadingPanel.className) // IE, Opera |
| { |
| loadingPanel.nextSibling.style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
| } |
| else if (document.getElementsByClassName) // Firefox |
| { |
| var panels = document.getElementsByClassName("MyModalPanel"); |
| for (var j = 0; j < panels.length; j++) { |
| panels[j].style.backgroundPosition = "center " + (parseInt(scrollTopOffset) + parseInt(viewportHeight / 2) - parseInt(loadingImageHeight / 2)) + "px"; |
| } |
| } |
| } |
| .MyLoadingImage |
| { |
| position:relative; |
| top:50%; |
| margin-top:-30px; |
| left:50%; |
| margin-left:-65px; |
| } |