how to add multiple checkbox in single item template inside gridview on row data bound

Ankit tewari
Ankit t...
40 Points
20 Posts

I am working in room booking  page according bed wise . i am getting value inside grid view on item template  field from database is 

if  1 bed then (1)
if  2 bed then (1,1)
if  5 bed then (1,1,1,1,1)

aspx code is

<asp:TemplateField HeaderText="Bed Status">
<ItemStyle HorizontalAlign="Center" />
    <asp:CheckBox ID="chknoofbeds" runat="server" />
    <asp:Label ID="lblnoofbeds" runat="server" Text='<%# Eval("No_of_beds") %>'  visible ="false">

Now how  i can add multiple checkbox in single template  on row databound. according this value (1),(1,1),(1,1,1,1)..etc

Views: 8799
Total Answered: 1
Total Marked As Answer: 0
Posted On: 07-Feb-2019 23:57

Share:   fb twitter linkedin
Use checkboxlist instead of checkbox inside itemtemplate
 - Rahul Maurya  08-Feb-2019 05:02
Rahul Maurya
Rahul M...
1402 Points
236 Posts

Use following as reference

Posted On: 08-Feb-2019 05:16
 Log In to Chat