Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 07, 2012 05:44 AM by Catherine Shan - MSFT
Member
14 Points
208 Posts
Nov 01, 2012 08:19 AM|LINK
I want know how to dragrdrop for combobox ajax control for databoundfield in gridview
please hepl me any thing . thanks
All-Star
65839 Points
11163 Posts
Nov 02, 2012 03:30 AM|LINK
Refer this
http://forums.asp.net/t/1799493.aspx/1
Nov 04, 2012 06:26 AM|LINK
chetan.sarode Refer this http://forums.asp.net/t/1799493.aspx/1
OK , kNOW PLEASE TELL ME HOW PASSING VARIABLES FROM PAGES ASP.NET USING COMBOBOX AJAX CONTROL IN GRIDVIEW
23382 Points
2490 Posts
Microsoft
Nov 07, 2012 05:44 AM|LINK
Hi,
You can get the seleted value of this ComboBox in the Gridview as follows:
In the .aspx
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="name" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="name" HeaderText="name" ReadOnly="True" SortExpression="name" /> <asp:BoundField DataField="age" HeaderText="age" SortExpression="age" /> <asp:TemplateField> <ItemTemplate> <asp:ComboBox ID="ComboBox1" runat="server" AutoPostBack="True" OnTextChanged="ComboBox1_TextChanged"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> </asp:ComboBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testdatabaseConnectionString9 %>" SelectCommand="SELECT * FROM [Table_1]"></asp:SqlDataSource>
In the .cs
protected void ComboBox1_TextChanged(object sender, EventArgs e) { ComboBox ComboBox1 = (ComboBox)sender; Response.Write(ComboBox1.SelectedItem.Text); }
If you wan to bind value to Combobox, you can use use the RowDataBound event of the GridView and follow the demo below:
http://www.codeproject.com/Articles/53559/Accessing-a-DropDownList-inside-a-GridView
Best wishes,
Mohammed Sal...
Member
14 Points
208 Posts
How to ACCESS BOUNDFIELD WITH COMBOBOX AJAX CONTROL IN GRIDVIEW
Nov 01, 2012 08:19 AM|LINK
I want know how to dragrdrop for combobox ajax control for databoundfield in gridview
please hepl me any thing . thanks
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: How to ACCESS BOUNDFIELD WITH COMBOBOX AJAX CONTROL IN GRIDVIEW
Nov 02, 2012 03:30 AM|LINK
Refer this
http://forums.asp.net/t/1799493.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Mohammed Sal...
Member
14 Points
208 Posts
Re: How to ACCESS BOUNDFIELD WITH COMBOBOX AJAX CONTROL IN GRIDVIEW
Nov 04, 2012 06:26 AM|LINK
OK , kNOW PLEASE TELL ME HOW PASSING VARIABLES FROM PAGES ASP.NET USING COMBOBOX AJAX CONTROL IN GRIDVIEW
Catherine Sh...
All-Star
23382 Points
2490 Posts
Microsoft
Re: How to ACCESS BOUNDFIELD WITH COMBOBOX AJAX CONTROL IN GRIDVIEW
Nov 07, 2012 05:44 AM|LINK
Hi,
You can get the seleted value of this ComboBox in the Gridview as follows:
In the .aspx
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="name" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="name" HeaderText="name" ReadOnly="True" SortExpression="name" /> <asp:BoundField DataField="age" HeaderText="age" SortExpression="age" /> <asp:TemplateField> <ItemTemplate> <asp:ComboBox ID="ComboBox1" runat="server" AutoPostBack="True" OnTextChanged="ComboBox1_TextChanged"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> </asp:ComboBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testdatabaseConnectionString9 %>" SelectCommand="SELECT * FROM [Table_1]"></asp:SqlDataSource>In the .cs
protected void ComboBox1_TextChanged(object sender, EventArgs e) { ComboBox ComboBox1 = (ComboBox)sender; Response.Write(ComboBox1.SelectedItem.Text); }If you wan to bind value to Combobox, you can use use the RowDataBound event of the GridView and follow the demo below:
http://www.codeproject.com/Articles/53559/Accessing-a-DropDownList-inside-a-GridView
Best wishes,
Feedback to us
Develop and promote your apps in Windows Store