Hi,
I'm using the asp Grid to bring back some very simple data using Telerik.Web.UI 2013.1.403.40
I have a problem where if I enable MasterTableView's CommandItemDisplay to anything other than None, it displays two header rows.
(I've attached a screenshot to demonstrate my issue.)
Here's my markup:
And here's code behind to bind it (the data source is a DataTable):
I need to display the Export to Excel button - and each time I enable that toolbar it shows up twice. Where am I going wrong? Please help! (See attached screenshot at bottom of post for an example.)
Also - this is less important - with the BoundColumn the header text is never picked up. I have to set it programmatically in the ItemDataBound event this is quit annoying however, I can live with this, but why does it happen, am I missing something here too?
Thank you in advance for taking the time to look at this.
I'm using the asp Grid to bring back some very simple data using Telerik.Web.UI 2013.1.403.40
I have a problem where if I enable MasterTableView's CommandItemDisplay to anything other than None, it displays two header rows.
(I've attached a screenshot to demonstrate my issue.)
Here's my markup:
<rad:RadGrid runat="server" ID="grdGroupLeaderReport" AutoGenerateColumns="False"> <MasterTableView CommandItemDisplay="Top"> <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" ShowExportToExcelButton="True" /> <Columns> <rad:RadGridBoundColumn DataField="Id" UniqueName="Id" HeaderText="Booking Id"> <HeaderStyle Width="110px"></HeaderStyle> <ItemStyle HorizontalAlign="Right"></ItemStyle> </rad:RadGridBoundColumn> <rad:RadGridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="First Name"> <HeaderStyle Width="150px"></HeaderStyle> </rad:RadGridBoundColumn> </Columns> </MasterTableView></rad:RadGrid>And here's code behind to bind it (the data source is a DataTable):
grdGroupLeaderReport.DataSource = rc.GroupLeaderReport();grdGroupLeaderReport.DataBind();I need to display the Export to Excel button - and each time I enable that toolbar it shows up twice. Where am I going wrong? Please help! (See attached screenshot at bottom of post for an example.)
Also - this is less important - with the BoundColumn the header text is never picked up. I have to set it programmatically in the ItemDataBound event this is quit annoying however, I can live with this, but why does it happen, am I missing something here too?
void grdGroupLeaderReport_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridHeaderItem) { var header = (GridHeaderItem)e.Item; header["Id"].Text = @"Booking No."; header["FirstName"].Text = @"First Name"; } }Thank you in advance for taking the time to look at this.