Bind DropdownList
-
Hi to all, I want to bind DropdownList inside the DataGrid. If you have the code or Examples Please Paste it. Mkanchha
Hi, Find the dropdown list control in the DataItemBound method of data grid method. and here you can use the dropdown list. Regards, Rohit Rathod Contact: +91 9898891036
-
Hi to all, I want to bind DropdownList inside the DataGrid. If you have the code or Examples Please Paste it. Mkanchha
Hi Friend, You want to do following steps. ************************************************ 1.Add a new SqlDataSource. 2.In the page load function give SqlDataSource1.ConnectionString = "server=yourserver;Integrated Security=yes;Database=yourdatabase" SqlDataSource1.SelectCommand = "SELECT [field1], [field2] FROM [yourdatabase]" After these in the designe phase you should give connection to drop down list <asp:DropDownList ID="DropDownList1" runat="server" Width="156px" DataSourceID="SqlDataSource1" DataTextField="field1"> ************************************************************ thats all.... try....
Sherin Iranimose
-
Hi to all, I want to bind DropdownList inside the DataGrid. If you have the code or Examples Please Paste it. Mkanchha
You can do all these things at designe time. it is difficult to explain.But it is easy. try it yourself.
Sherin Iranimose
-
Hi, Find the dropdown list control in the DataItemBound method of data grid method. and here you can use the dropdown list. Regards, Rohit Rathod Contact: +91 9898891036
-
Hi to all, I want to bind DropdownList inside the DataGrid. If you have the code or Examples Please Paste it. Mkanchha
Hi, You can bind Dropdownlist inside ItemTemplate of Datagrid.The following my code:
<asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns>
-
Hi, You can bind Dropdownlist inside ItemTemplate of Datagrid.The following my code:
<asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns>