<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Getting Started</title><link>http://forums.silverlight.net/forums/14.aspx</link><description>The perfect forum for asking the basic questions. No question too simple!</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/225115.aspx</link><pubDate>Wed, 27 May 2009 11:19:25 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:225115</guid><dc:creator>basechen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/225115.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=225115</wfw:commentRss><description>&lt;p&gt;Hi, I would like to know how can i fully code it with C# include the DataGridTemplateColumn??&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I got the solution, just ignore this.&lt;/p&gt;&lt;p&gt;http://blogs.msdn.com/scmorris/archive/2008/04/14/defining-silverlight-datagrid-columns-at-runtime.aspx &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/157101.aspx</link><pubDate>Wed, 07 Jan 2009 08:44:28 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:157101</guid><dc:creator>methis</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/157101.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=157101</wfw:commentRss><description>&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/157095.aspx</link><pubDate>Wed, 07 Jan 2009 08:37:16 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:157095</guid><dc:creator>shamrat231</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/157095.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=157095</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;methis:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;string slc = ((ComboBox)GridView1.SelectedRow.FindControl(&amp;quot;cbo&amp;quot;)).SelectedItem.Text&lt;strong&gt; for each row&lt;/strong&gt; in the grid. in selectionEventChanged in GridView&lt;/p&gt;
&lt;p&gt;Anyone??&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Here is the soln&lt;/p&gt;
&lt;p&gt;ComboBox cbo = (ComboBox)DataGrid.Columns[1].GetCellContent(DataGrid.SelectedItem);&lt;/p&gt;
&lt;p&gt;string slc = ((PersonClass)cbo.SelectedItem).Name;&lt;/p&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;p&gt;class Person&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;public string Name {get;set;};&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;and if the &lt;strong&gt;post&lt;/strong&gt; was &lt;strong&gt;helpful&lt;/strong&gt; then &lt;strong&gt;please &amp;#39;Mark as Answer&amp;#39; - many thanks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sharker Khaleed Mahmud&lt;br /&gt;Software Developer&lt;br /&gt;(MCP,MCTS,MCPD[web])&lt;/p&gt;
&lt;p&gt;This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. &lt;/p&gt;</description></item><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/155566.aspx</link><pubDate>Sun, 04 Jan 2009 03:11:32 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155566</guid><dc:creator>methis</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/155566.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=155566</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The answer provided by &lt;strong&gt;Elango.ka is &lt;/strong&gt;not good enough and yes, &lt;a class="namelink" href="http://silverlight.net/members/shamrat231.aspx"&gt;&lt;font color="#697dff"&gt;shamrat231&lt;/font&gt;&lt;/a&gt;&amp;nbsp;is right.&amp;nbsp;This itself is frustating.&lt;/p&gt;
&lt;p&gt;in ASP.NET it could easily be done by this way&lt;/p&gt;
&lt;p&gt;string slc = ((ComboBox)GridView1.SelectedRow.FindControl(&amp;quot;cbo&amp;quot;)).SelectedItem.Text&lt;strong&gt; for each row&lt;/strong&gt; in the grid. in selectionEventChanged in GridView&lt;/p&gt;
&lt;p&gt;Can anyone could give a good/strong soln&lt;img src="http://silverlight.net/emoticons/emotion-6.gif" alt="Sad" /&gt;&lt;/p&gt;
&lt;p&gt;Anyone??&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;newbie&lt;/p&gt;</description></item><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/155292.aspx</link><pubDate>Sat, 03 Jan 2009 07:20:59 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155292</guid><dc:creator>shamrat231</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/155292.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=155292</wfw:commentRss><description>&lt;p&gt;Hi, &lt;strong&gt;Elango.ka&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;i tried your scenario and it failed the &lt;strong&gt;first test case&lt;/strong&gt; i wrote based on the soln that&amp;nbsp;you provided&lt;/p&gt;
&lt;p&gt;suppose in combobox selectionChangeEvent if i save the result in&lt;br /&gt;in cbovalue.Text&lt;/p&gt;
&lt;p&gt;Now:&lt;br /&gt;1. change selected item in first row of combobox&lt;br /&gt;2. chage the selected item in second row combobox&lt;br /&gt;3. then choose the first row of the datagrid,&lt;br /&gt;4. in selectionChangeEvent of datagrid, i will get the first row id and&lt;br /&gt;5. in cbovalue.Text the combobox[int this case second row selection] as it was selected last in cbo selectionChangedEvent&lt;/p&gt;
&lt;p&gt;[CONC] this will not work, and is not good programming&lt;img src="http://silverlight.net/emoticons/emotion-1.gif" alt="Smile" /&gt;, i am having the same problem&lt;/p&gt;
&lt;p&gt;Hopefully someone would be able to give a better soln&lt;/p&gt;
&lt;p&gt;and if this &lt;strong&gt;post&lt;/strong&gt; was &lt;strong&gt;helpful&lt;/strong&gt; then &lt;strong&gt;please &amp;#39;Mark as Answer&amp;#39; - many thanks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sharker Khaleed Mahmud &lt;br /&gt;(MCP,MCTS,MCPD[web])&lt;br /&gt;Software Developer&lt;/p&gt;
&lt;p&gt;This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.&lt;/p&gt;</description></item><item><title>Re: ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/154669.aspx</link><pubDate>Thu, 01 Jan 2009 12:40:33 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:154669</guid><dc:creator>Elango.ka</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/154669.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=154669</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;The datagrid selection changed event is based by the datagrid events, not a event for combo box. so, you can add the selectionchanged event at your datagrid combobox. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;lt;data:DataGridTemplateColumn Header=&amp;quot;destination&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;data:DataGridTemplateColumn.CellTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ComboBox x:Name=&amp;quot;cbo&amp;quot; DisplayMemberPath=&amp;quot;Name&amp;quot; ItemsSource=&amp;quot;{Binding Country}&amp;quot; SelectionChanged=&amp;quot;cboChanged&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/data:DataGridTemplateColumn.CellTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/data:DataGridTemplateColumn&amp;gt;&lt;/p&gt;&lt;p&gt;If you need which row combo box is selected, then add and use with DataContext property,&lt;/p&gt;&lt;p&gt;&amp;lt;ComboBox x:Name=&amp;quot;cbo&amp;quot; DisplayMemberPath=&amp;quot;Name&amp;quot; ItemsSource=&amp;quot;{Binding Country}&amp;quot; SelectionChanged=&amp;quot;cboChanged&amp;quot; DataContext=&amp;quot;PrimaryId&amp;quot;/&amp;gt; &lt;/p&gt;&lt;p&gt;Now your cboChanged event is,&lt;/p&gt;&lt;p&gt;&amp;nbsp;private sub cboChanged(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)&lt;/p&gt;&lt;p&gt;&amp;nbsp;Dim cmbobx as new combobox&lt;/p&gt;&lt;p&gt;combobox=sender&lt;/p&gt;&lt;p&gt;id=combobox.datacontext&lt;/p&gt;&lt;p&gt;&amp;nbsp;country=combobox.selecteditem.tostring&lt;/p&gt;&lt;p&gt;end sub &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>ComboBox seletedItem in Data</title><link>http://forums.silverlight.net/forums/thread/154596.aspx</link><pubDate>Thu, 01 Jan 2009 03:14:43 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:154596</guid><dc:creator>methis</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/154596.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=14&amp;PostID=154596</wfw:commentRss><description>&lt;p&gt;Hi, all any time&amp;nbsp;in this post would be &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am actually new with this. Here is my template column&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;data:DataGridTemplateColumn Header=&amp;quot;destination&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;data:DataGridTemplateColumn.CellTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ComboBox x:Name=&amp;quot;cbo&amp;quot; DisplayMemberPath=&amp;quot;Name&amp;quot; ItemsSource=&amp;quot;{Binding Country}&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/data:DataGridTemplateColumn.CellTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/data:DataGridTemplateColumn&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;ok, now i have a datagrid where first column gives ID, and second column is this Combobox [for each row]. Suppose the user choose one of the item in combobox and then select the row in the datagrid, now on selectionChangedEvent in datagrid, &lt;/p&gt;
&lt;p&gt;1. how would i actually findout the combobox in the selected row, &lt;/p&gt;
&lt;p&gt;so i can get the item selected in combobox. i hope the code solution is simple&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;private void dataGrid_SelectionChanged(object sender,SelectionChangedEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;//what is it that i have to do here to get the combo of the selected row&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I couldnot find any article where they actually find the item selected in combobox&amp;nbsp;when a row is selected in DataGrid.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks. some code base solution would help &lt;img src="http://silverlight.net/emoticons/emotion-10.gif" alt="Embarrassed" /&gt;&lt;/p&gt;
&lt;p&gt;newbiee&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>