or
<telerik:GridTemplateColumn AllowFiltering="False" UniqueName="columnAction" > <HeaderStyle Width="30px" /> <HeaderTemplate> <asp:Label ID="lblHeaderAction" runat="server" Text="Action"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Panel ID="editButtonPanel" runat="server" CssClass="custom-Action-column" Width="50px"> <asp:ImageButton ID="TagCloudButton" runat="server" Width="15px" Height="15px" CommandName="TagCloud" CausesValidation="False" ImageUrl="~/images/icon_grid.gif" /> </asp:Panel> </ItemTemplate></telerik:GridTemplateColumn> <telerik:GridTemplateColumn AllowFiltering="False" UniqueName="ProfileImage" > <HeaderStyle Width="50px" /> <HeaderTemplate> <asp:Label ID="lblHeaderActionImage" runat="server" Text="Image"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Panel ID="ImagePanelPos" runat="server" CssClass="custom-Action-column" Width="50px"> <asp:Image ID="Image1" runat="server" Height="35px" Width="35px" ImageUrl='<%#Convert.ToString(Eval("Url")) %>' /> </asp:Panel> </ItemTemplate></telerik:GridTemplateColumn>Hello,
i have a GridDropDownColumn connected to a DataSource and i get an error when i try to set the ListTextField property like this: ListTextField = "Field1, Field2". How can i achieve this programmatically in radgrid view mode?
I have written the following code to achieve this in radgrid edit mode:
if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem editItem = (GridEditableItem)e.Item; RadComboBox combo = (RadComboBox)editItem["Field1"].Controls[0]; combo.ItemDataBound += new RadComboBoxItemEventHandler(combo_ItemDataBound); } void combo_ItemDataBound(object sender, RadComboBoxItemEventArgs e) { RadComboBoxItem item = (RadComboBoxItem)e.Item; DataRowView dr = (DataRowView)e.Item.DataItem; item.Text = item.Text + " ( " + dr["Field2"].ToString() + " " + dr["Field3"].ToString() + " ) "; }Thank you very much.
<telerik:RadGrid ID="ListView_RadGrid" runat="server" OnPreRender="ListView_RadGrid_OnPreRender" EnableViewState="True" GridLines="None" TabIndex="5" AllowPaging="True" AllowSorting="True" OnSortCommand="ListView_RadGrid_SortCommand" OnDataBound="ListView_RadGrid_DataBound" OnDataBinding="ListView_RadGrid_DataBinding" OnPageIndexChanged="ListView_RadGrid_PageIndexChanged" OnNeedDataSource="ListView_RadGrid_OnNeedDataSource" OnRowDrop="ListView_RadGrid_OnRowDrop" AllowMultiRowSelection="True" ShowDesignTimeSmartTagMessage="True" AllowCustomPaging="True" OnPageSizeChanged="ListView_RadGrid_PageSizeChanged" > <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" ShowPagerText="True" AlwaysVisible="True" /> <MasterTableView ShowHeader="true" AllowMultiColumnSorting="false" AutoGenerateColumns="False" EnableViewState="False" ClientDataKeyNames="ObjectId,Status" DataKeyNames="ObjectId" > <CommandItemSettings ExportToPdfText="Export to Pdf" /> </MasterTableView></telerik:RadGrid><telerik:GridDateTimeColumn PickerType="DatePicker" DataField="InstallationDate" FilterControlAltText="Filter Install Date" HeaderText="Install Date" SortExpression="InstallationDate" UniqueName="InstallationDate" ReadOnly="false" AllowFiltering="true" MaxLength="50" ColumnEditorID="gceSmallDateBox"> </telerik:GridDateTimeColumn><telerik:GridDateTimeColumnEditor runat="server" ID="gceSmallDateBox"> <TextBoxStyle CssClass="smallTextBox" /> </telerik:GridDateTimeColumnEditor>Response.ContentType = "application/pdf";Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + fullfilename + "\"");Response.TransmitFile(fullfilename);winPDF.VisibleOnPageLoad = false; // Close the RadWindowfunction closePDF() { var window = $find("ctl00_ContentPlaceHolder_winPDF"); window.close(); }<telerik:RadWindow ID="winPDF" Width="300px" Height="240px" runat="server" Title="Export to PDF" Style="z-index: 999999" VisibleOnPageLoad="false" Behaviors="Move" EnableShadow="true" Modal="true" OnClientClose="OnClientClose"> <ContentTemplate> <div style="padding: 5px;"> <telerik:RadButton ID="btnEx2PDF" OnClick="Export2PDF" CommandName="Export" Text="Export" OnClientClicked="closePDF();return false;" runat="server"> </telerik:RadButton> <telerik:RadButton ID="btnCancel" OnClick="Export2PDF" CommandName="Cancel" Text="Cancel" CausesValidation="false" runat="server"> </telerik:RadButton> </div>...