binding on listbox in datagrid
Hello,
I am facing the kind of same problem
I had been to the website as mentioned above.But I have a simpler problem(though not able to find the answer).
I wanted to put a listbox in datagrid and the value in listbox should be a simple count from 0 to 10.
The code
<asp:GridView ID="gd1" runat="server" Style="z-index: 100; left: 0px; position: absolute;
top: 16px" Width="704px" BackColor="#FFC0FF">
<Columns>
<asp:TemplateField HeaderText="Quantity">
<ItemTemplate>
<asp:ListBox ID="qty" runat="server" Width="75px" Height="30px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now, the problem is I want to set a maximum quanitity to 10. But I dont know how to bid the listbox in datagrid from count 0 to 10. and evenif somehow I manage to do that, how can I retrieve the value.
what event shall I use.
May I put a button after the value is set or can we use IndexChange event , if it is possible. I might sound a bit confused, the reason is I am not sure about how to manage the event on listbox which is in datagrid
Please Help!!
Regards
|