Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 09, 2012 07:46 AM by kaushikmaheta
Member
142 Points
108 Posts
Jul 20, 2011 04:59 AM|LINK
Hi all,
I am required to create data grid dynamically. On some condition the datagrid will have controls as textbox / combobox / textblock.
something like:
Column1 Column2 Column3
value1 Combobox value2
value3 textbox value4
Please suggest some idea to create and add controls dynamically.
Regards,
Ankum
671 Points
214 Posts
Jul 20, 2011 05:10 AM|LINK
Hi Ankum,
Click below URL for your problem
http://www.aspsnippets.com/Articles/Adding-Dynamic-Rows-in-ASP.Net-GridView-Control-with-TextBoxes.aspx
Jul 20, 2011 05:37 AM|LINK
sorry to mention above, I am required to use WPF / .Net framework 3.5 for this.
4 Points
2 Posts
Jul 22, 2011 04:25 AM|LINK
nice
Jul 22, 2011 06:16 AM|LINK
Please suggest some idea..
204 Points
111 Posts
Aug 02, 2011 10:35 AM|LINK
Hi,
Try this following links,
http://www.eggheadcafe.com/tutorials/aspnet/ab67a9fa-7fe1-4995-a6e1-bf33de76bd69/add-windows-gridview-control--in-wpf-dynamically-in-c.aspx
thanks,
Soundar.K
Aug 11, 2011 04:44 AM|LINK
Thanks Soundar84.
It was really great help.
Aug 01, 2012 08:30 AM|LINK
Hi guys..
I am stuck again here.. I have the same requirement as mentioned above and I have used :
<WindowsFormsHost Height="400" Margin="0,10,0,10" Name="windowsFormsHostDetail" Grid.ColumnSpan="2"Grid.Row="1" VerticalAlignment="Top" >
windowsFormsHostDetail.Child = dataGridViewDetail;
But this is not wpf datagrid so UI does not look that good. My preference is to use wpf datagrid with dynamic loading of controls in data grid cells.
Contributor
3773 Points
896 Posts
Oct 09, 2012 07:46 AM|LINK
help this link
http://www.eggheadcafe.com/tutorials/xaml/ab67a9fa-7fe1-4995-a6e1-bf33de76bd69/add-windows-gridview-control--in-wpf-dynamically-in-c.aspx
ankum16
Member
142 Points
108 Posts
create controls dynamically in datagrid
Jul 20, 2011 04:59 AM|LINK
Hi all,
I am required to create data grid dynamically. On some condition the datagrid will have controls as textbox / combobox / textblock.
something like:
Column1 Column2 Column3
value1 Combobox value2
value3 textbox value4
Please suggest some idea to create and add controls dynamically.
Regards,
Ankum
rambhopalred...
Member
671 Points
214 Posts
Re: create controls dynamically in datagrid
Jul 20, 2011 05:10 AM|LINK
Hi Ankum,
Click below URL for your problem
http://www.aspsnippets.com/Articles/Adding-Dynamic-Rows-in-ASP.Net-GridView-Control-with-TextBoxes.aspx
Rambhopal Reddy E
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.
ankum16
Member
142 Points
108 Posts
Re: create controls dynamically in datagrid
Jul 20, 2011 05:37 AM|LINK
sorry to mention above, I am required to use WPF / .Net framework 3.5 for this.
scorpion1211
Member
4 Points
2 Posts
Re: create controls dynamically in datagrid
Jul 22, 2011 04:25 AM|LINK
nice
ankum16
Member
142 Points
108 Posts
Re: create controls dynamically in datagrid
Jul 22, 2011 06:16 AM|LINK
Please suggest some idea..
soundar84
Member
204 Points
111 Posts
Re: create controls dynamically in datagrid
Aug 02, 2011 10:35 AM|LINK
Hi,
Try this following links,
http://www.eggheadcafe.com/tutorials/aspnet/ab67a9fa-7fe1-4995-a6e1-bf33de76bd69/add-windows-gridview-control--in-wpf-dynamically-in-c.aspx
thanks,
Soundar.K
ankum16
Member
142 Points
108 Posts
Re: create controls dynamically in datagrid
Aug 11, 2011 04:44 AM|LINK
Thanks Soundar84.
It was really great help.
ankum16
Member
142 Points
108 Posts
Re: create controls dynamically in datagrid
Aug 01, 2012 08:30 AM|LINK
Hi guys..
I am stuck again here.. I have the same requirement as mentioned above and I have used :
<WindowsFormsHost Height="400" Margin="0,10,0,10" Name="windowsFormsHostDetail" Grid.ColumnSpan="2"Grid.Row="1" VerticalAlignment="Top" >
windowsFormsHostDetail.Child = dataGridViewDetail;
But this is not wpf datagrid so UI does not look that good. My preference is to use wpf datagrid with dynamic loading of controls in data grid cells.
kaushikmahet...
Contributor
3773 Points
896 Posts
Re: create controls dynamically in datagrid
Oct 09, 2012 07:46 AM|LINK
help this link
http://www.eggheadcafe.com/tutorials/xaml/ab67a9fa-7fe1-4995-a6e1-bf33de76bd69/add-windows-gridview-control--in-wpf-dynamically-in-c.aspx
Remember to click Mark as Answer on the post that helps to others.