Check box in DataGrid

  • Thread starter Thread starter SAI
  • Start date Start date
Hello,

this should do:

<asp:datagrid id="DataGrid1"
style="Z-INDEX: 101; LEFT: 9px; POSITION: absolute; TOP: 15px"
runat="server" AutoGenerateColumns="False"
DataKeyField="Productid">
<Columns>
<asp:TemplateColumn HeaderText="ProductName">
<ItemTemplate>
<asp:CheckBox id=chk runat="server"
Text =<%# DataBinder.Eval(Container.DataItem, "ProductName") %>
checked='<%# DataBinder.Eval(Container.DataItem, "Discontinued") %>'>
</asp:CheckBox>

</ItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn ButtonType="PushButton"
CommandName="Update" Text="Update"></asp:ButtonColumn>
</Columns>
</asp:datagrid>
Greeting------------------------------------------
Daniel Walzenbach
MCP

www.walzenbach.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top