Hi,
I'm adding a RadGrid to a page and am having issues getting my table data to display.
The grid is generally working, but every cell displays as 'system.data.datarowview' - looks like it's calling ToString() on the wrong object?
I am populating the grid entirely in code, but am declaring it statically in my ASPX.
I create the columns in the Page_Load method (when !IsPostback) - there is a variety of GridBoundColumns and GridHyperlinkColumns. The columns are instantiated, added to the grid.MasterTableView.Columns collection, and *then* have additional properties set.
When the time comes to populate the grid (during a partial postback event), I have a helper class that produces a DataTable object with columns with names that match the GridColumns in the grid.
I finally call Rebind() and set the DataSource of the grid to my DataTable in the NeedDataSource event.
When stepping through some of the events (I create a custom paging control), I can clearly see that my data is present in the DataSource, but it's not making it through to the grid.
If I set the grid to AutoGenerateColumns=true in my ASPX, I get duplicate columns, but the auto generated ones are displaying my cell data correctly.
I suspect I'm missing some step in wiring the DataTable columns to the GridColumns. Any advice?
Thanks,
Stefan
I'm adding a RadGrid to a page and am having issues getting my table data to display.
The grid is generally working, but every cell displays as 'system.data.datarowview' - looks like it's calling ToString() on the wrong object?
I am populating the grid entirely in code, but am declaring it statically in my ASPX.
I create the columns in the Page_Load method (when !IsPostback) - there is a variety of GridBoundColumns and GridHyperlinkColumns. The columns are instantiated, added to the grid.MasterTableView.Columns collection, and *then* have additional properties set.
When the time comes to populate the grid (during a partial postback event), I have a helper class that produces a DataTable object with columns with names that match the GridColumns in the grid.
I finally call Rebind() and set the DataSource of the grid to my DataTable in the NeedDataSource event.
When stepping through some of the events (I create a custom paging control), I can clearly see that my data is present in the DataSource, but it's not making it through to the grid.
If I set the grid to AutoGenerateColumns=true in my ASPX, I get duplicate columns, but the auto generated ones are displaying my cell data correctly.
I suspect I'm missing some step in wiring the DataTable columns to the GridColumns. Any advice?
Thanks,
Stefan