This is a migrated thread and some comments may be shown as answers.

Derived Columns

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark H
Top achievements
Rank 1
Mark H asked on 23 Jun 2009, 12:37 PM
If I have a data source delivering columns A, B and C and I want to have the grid display two columns, the first with the contents of A and the second with some function of B & C (assume not achievable via plain SQL), do I have to create invisible gridboundcolumns for B & C and a new gridboundcolumn D and then set D = fn(B,C) etc in the grid's ItemDataBound event? Is this better than referencing the underlying data set in that event? Can anyone point me at some examples of this?

Thanks,
M

1 Answer, 1 is accepted

Sort by
0
Mark H
Top achievements
Rank 1
answered on 23 Jun 2009, 07:51 PM
Ah I now see to pull this stuff from the associated DataRowView via the DataItem property of the GridDataItem

M
Tags
Grid
Asked by
Mark H
Top achievements
Rank 1
Answers by
Mark H
Top achievements
Rank 1
Share this question
or