View Single Post
  #1 (permalink)  
Old August 20th, 2004, 03:36 PM
kmazumdar kmazumdar is offline
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to display checkbox in a DataGrid

Hi,

Another beginer's question :

I am still working on my very first form using ASp.NET and C# - so please bear with me.

I am fetching results into a DataGrid. One of the column has a Y or N value and I want show a Checkbox ( Checked if 'Y' and non-checked, if 'N'). I also need to change background color of the row, if the value is 'N'. Here is my ItemTemplate :
Code:
<asp:BoundColumn DataField="ACTIVE_IND" ItemStyle-HorizontalAlign="Center" HeaderText="Active Indicator"></asp:BoundColumn>
Data for this DataGrid is bound in the click event of a submit button.

Code:
DataGrid1.DataSource = ds.Tables["nnld"];
DataGrid1.DataBind();
Thanks in advance.


Reply With Quote