Data Type of bound column

Posts   
 
    
PilotBob
User
Posts: 105
Joined: 29-Jul-2005
# Posted on: 29-May-2007 22:13:13   

Does any one know how, given an asp.net DataGrid reference and the header text of one of the columns to determine the data type of the object to which the column is bound. For example, I need to know if it is a string, date or numeric type.

Thanks, BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 30-May-2007 11:33:06   

Can't you do that in the HTML, using <%# %> syntaxis and check the type of the value? (will likely result in ugly html though) the only other way I think is in code behind in the databinding event handler where you find controls and enable/disable them and set the values based on the value in the datasource row.

Frans Bouma | Lead developer LLBLGen Pro