So I set a datasoruce to the datatabler and then do .Databind().
The .items is full but the .columns is empty!!
Why is the .Columns empty I thought it was suppose to autogenerate the columns from the fields in the table!!
Confused!!
RadGrid objTheGrid
DataTable dtResult = new DataTable();
dtResult = objLineTrendsTools.Reports.Provider.Grids.getDefaultView(objParameters);
objTheGrid.DataSource = dtResult;
objTheGrid.DataBind();
If ( objTheGrid.items.count > 0 ) // this works has items
if ( objTheGrid.columns.count > 0 ) // this doesnt works as the Columns is empty .Count = 0
see , this is the watch:
and the aspx code:
<telerik:RadGrid ID="grdData" runat="server" Height="300px" Skin="Metro" ShowFooter="false" Font-Names="Arial,Verdana,Tahoma" Font-Size="11px" OnSelectedIndexChanged="grdData_SelectedIndexChanged">
<MasterTableView AutoGenerateColumns="true" TableLayout="Fixed">
<HeaderStyle CssClass="ColumnHeaderCellStyle" />
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true" >
<Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="2" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>