How to disable a checkbox in a datagrid?

burak

Centurion
Joined
Jun 17, 2003
Messages
127
Hello,

I have a datagrid made up of two columns, the first has a checkbox in it and the other holds a job id.

<Columns>
<asp:TemplateColumn HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkIncomplete" Runat="server"> </asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="VJC Ref#" SortExpression="JOB_ID" DataField="JOB_ID" HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"></asp:BoundColumn>
</columns>

When there are no job ids, I insert a blank row into the grid from the code behind

row(1) = "No active job orders have been saved"
ds.Tables(0).Rows.InsertAt(row, 0)
dtgActive.DataSource = ds.Tables(0)
dtgActive.DataBind()

when I do this however, the checkbox also shows up.

How can I prevent the checkbox from showing up?

Thank you,

Burak
 
Back
Top