I have a DataTable that contains 3 fields: ACount, BCount and DCount. If ACount < 0 then I need to display ‘S’ in one of the columns of the GridView. If ACount > 0 then I have to display ‘D’ in that column(in label). Same thing with BCount and DCount. How can I do this conditional check in the RowDataBound function?
I have a DataTable that contains 3 fields: ACount , BCount and DCount .
Share
The GridView
OnRowDataBoundevent is your friend:I’m not sure where you want the ‘S’ and ‘D characters rendered, but you should be able to rejig to meet your needs.