Hello,
I want to show grid header always,even there is no datasource or records,here is the code I tried,but the header did't show:
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" CellSpacing="0" ShowHeader="true">
<MasterTableView AutoGenerateColumns="false" ShowHeader="true" ShowHeadersWhenNoRecords="true">
<Columns>
<telerik:GridBoundColumn DataField="BrandName" HeaderText="Brand Name" UniqueName="BrandName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Model" HeaderText="Model" UniqueName="Model">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
what should I do?
Hi,
I’m trying to export a radgrid using this code:
RadGrid1.ExportSettings.Word.Format = Telerik.Web.UI.GridWordExportFormat.Docx;RadGrid1.ExportSettings.UseItemStyles = true;RadGrid1.MasterTableView.ExportToWord();Please can you clarify how to accomplish these things please?
Hi,
The "Apply CSS class" dropdown won't load if the css file uses Google fonts Eg.:
@import url(https://fonts.googleapis.com/css?family=Alegreya+Sans:400,100,300,500,700,800,900,900italic,800italic,700italic,500italic,400italic,300italic,100italic|Open+Sans:400,400italic);
Anything we can do about this?
Marc
Hi,
I am trying to add tabs, pageviews dynamically, and then iframes in the pageviews. However, on postback, the iframes are not persisted.
HtmlGenericControl iframe = new HtmlGenericControl("iframeA");
PageView pageView = new PageView();
pageView.Controls.Add(iframe);
multiPage.PageViews.Add(pageView);
However, if i statically do it (as below), the iframes are persisted. Can you please show me a way to make this work.
Thanks,
Raj
<telerik:RadPageView id="Pageview2" runat="server" >
<iframe id="ContentIframe2" width=100% height="600px" frameborder="0" scrolling="auto" runat="server"></iframe>
</telerik:RadPageView>
<telerik:RadPageView id="Pageview3" runat="server" >
<iframe id="ContentIframe3" width=100% height="600px" frameborder="0" scrolling="auto" runat="server"></iframe>
</telerik:RadPageView>
<telerik:RadPageView id="Pageview4" runat="server" >
<iframe id="ContentIframe4" width=100% height="600px" frameborder="0" scrolling="auto" runat="server"></iframe>
</telerik:RadPageView>
<telerik:RadPageView id="Pageview5" runat="server" >
<iframe id="ContentIframe5" width=100% height="600px" frameborder="0" scrolling="auto" runat="server"></iframe>
</telerik:RadPageView>
Hi,
I need to place an "X" in all cells that have a true value in the export. I've seen similar posts, but I am using Format="Xlsx" and trying to accomplish this task using the OnInfrastructureExporting event handler as follows:
protected void grdUserAdmin_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e){ var colCount = e.ExportStructure.Tables[0].Columns.Count; var rowCount = e.ExportStructure.Tables[0].Rows.Count; ExportStyle headerStyle = new ExportStyle(); headerStyle.ForeColor = Color.White; headerStyle.BackColor = Color.Blue; headerStyle.Font.Bold = true; // Set the header style for all columns for (var i = 1; i <= colCount; i++) { e.ExportStructure.Tables[0].Cells[i, 1].Style = headerStyle; e.ExportStructure.Tables[0].Columns[i].Width = 200; // Would like auto-width !! } // Place an "X" in cells assigned to a boolean data field if value is true var headerText = ""; for (var c = 1; c <= colCount; c++) { for (var r = 1; r <= rowCount; r++) { if (r == 1) { headerText = e.ExportStructure.Tables[0].Cells[c, r].Value.ToString(); continue; } if (headerText == "Active") { var x = e.ExportStructure.Tables[0].Cells[c, r].Value.ToString(); System.Diagnostics.Debug.WriteLine("Cell Value: " + x); if (Convert.ToBoolean(e.ExportStructure.Tables[0].Cells[c, r].Value.ToString())) e.ExportStructure.Tables[0].Cells[c, r].Value = "X"; } } }}The value for the variable x above is always "" or null (hard to tell in the Output section of VS).
I know that my data for column Active should have all true values.
The conversion to boolean fails!
I think I'm close.
What am I doing wrong?
Thanks in advance for any advice.
Jim
<telerik:RadGrid ID="rgComments" runat="server" AutoGenerateColumns="False" Width="100%" AllowSorting="True" CellSpacing="0" GridLines="None" Height="455px"> <MasterTableView CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Comment" CommandItemSettings-ShowRefreshButton="true" TableLayout="Fixed" EditMode="EditForms" DataKeyNames="iNoteID,qwImageID"> <EditFormSettings EditFormType="Template"> <FormTemplate> <div style="position: relative; height: 215px; width: 800px;"> <telerik:RadTextBox ID="rtbComment" runat="server" Width="795px" Height="165px" ClientEvents-OnLoad="taComment_onload" /> <asp:ImageButton ID="ibSave" runat="server" ImageUrl="~/Images/Save.png" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' style="position: absolute; left: 10px; top: 180px;" /> <asp:ImageButton ID="ibCancel" runat="server" ImageUrl="~/Images/Cancel.png" CommandName="Cancel" style="position: absolute; left: 70px; top: 180px;" /> </div> </FormTemplate> </EditFormSettings> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center" EditImageUrl="~/Images/Edit.png" UniqueName="gecEdit" /> <telerik:GridBoundColumn DataField="dtCreateDate" HeaderText="Create Date" HeaderStyle-Width="66" HeaderStyle-HorizontalAlign="Center" DataFormatString="{0:MM/dd/yyyy HH:mm}" ReadOnly="True" UniqueName="gbc_dtCreateDate" /> <telerik:GridBoundColumn DataField="cLoginName" HeaderText="Create By" HeaderStyle-Width="66" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ReadOnly="True" UniqueName="gbc_cLoginName" /> <telerik:GridBoundColumn DataField="cNote" HeaderText="Comment" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="500px" MaxLength="1024" UniqueName="gbc_cNote" /> <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center" ImageUrl="~/Images/Delete.png" UniqueName="bcDelete" /> </Columns> </MasterTableView> <ClientSettings><Scrolling AllowScroll="true" /></ClientSettings></telerik:RadGrid>void rgComments_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item.IsInEditMode && e.Item is GridEditableItem) { GridEditableItem item = e.Item as GridEditableItem; RadTextBox radTextBox = ((RadTextBox)(((GridEditFormItem)(item)).FindControl("rtbComment"))); // It works if I comment out this line, but then control is not populated with the necessary text radTextBox.Text = ((DataRowView)(((GridItem)(item)).DataItem)).Row["cNote"].ToString(); radTextBox.Focus(); }}

Dear Friends,
I am preparing dynamic grid using VB.net and RAD grid where columns are getting generated in Run Time. I am trying to apply filter (inbuilt filter) on multiple column at time but application is throwing exception (is neither a DataColumn nor a DataRelation for table Table). This error occurs when I try to apply filter. I am unable to identify root cause. Any input would be appreciated. I am using NeedDataSource() event of Radgrid and this event is throwing above mentioned exception on applying filter.
Thanks in advance.
Lokesh

I know I have done this before, but I can't remember how....don't you hate being in that situation?!?
I want a simple nested table, of say customers and their orders, displayed in a fashion where customers are the master table, and orders are the detail table. In other words, the grid shows a list of customers and you can expand a customer to see their orders. I can easily get the data in a datatable where the customer data is duplicated on each row which represents a unique order. I want to setup the grid so that I can do one bind and have it all populated. All of the examples now show a separate databind for each of the child(nested) tables. For efficiency and simplicity, I'd like to avoid all of the extra databinds. I know I've done this in the past...
Any help or examples would be greatly appreciated.
Thanks in advance,