<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Bind to existing grid column?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Bind to existing grid column?</description>
  <pubDate>Thu, 23 Apr 2026 08:11:47 -700</pubDate>
  <lastBuildDate>Mon, 19 Nov 2007 09:32:24 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=551</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Bind to existing grid column? : You should be able to programmaticallybind...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=551&amp;PID=1975#1975</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=113" rel="nofollow">jasonk</a><br /><strong>Subject:</strong> 551<br /><strong>Posted:</strong> 19-Nov-2007 at 9:32am<br /><br /><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You should be able to programmatically&nbsp;bind an existing column that has the&nbsp;same binding property path.&nbsp; See below sample.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">private void AddColumn(string pPropertyPath, string text) {<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ViewDescriptor vd = new ViewDescriptor(typeof(Customer), pPropertyPath);<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataGridViewBindingDescriptor dgvbd = dataGridViewBindingManager1.Descriptors.Add(vd);<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dgvbd.Column.HeaderText = text;<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; }<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">However, if the column is not bound or it is bound to a different property path, the “dataGridViewBindingManager1.Descriptors.Add” call will add a new column instead.<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">If there is another column that is also bound to the same property path and it has a valid ViewDescriptor, DF will also add a new column and&nbsp;ViewDescriptor. <o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Jason<o:p></o:p></SPAN></FONT></P>]]>
   </description>
   <pubDate>Mon, 19 Nov 2007 09:32:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=551&amp;PID=1975#1975</guid>
  </item> 
  <item>
   <title>Bind to existing grid column? : I have a Winforms DataGridView...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=551&amp;PID=1958#1958</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=98" rel="nofollow">Matthew</a><br /><strong>Subject:</strong> 551<br /><strong>Posted:</strong> 15-Nov-2007 at 4:47pm<br /><br />I have a Winforms DataGridView on a form to which I have added a few columns.&nbsp; These columns inherit from DataGridViewTextBoxColumn.&nbsp; Is there a way to have the Devforce grid binding manager use the existing columns instead of creating its own new columns?<br><br>I assumed that was why I would pass in the "typeof(TypeOfGridColumnHere)" when adding a descriptor, but in the end a standard winform textboxcolumn is added.<br><br>Thank you,<br>Matthew<br>]]>
   </description>
   <pubDate>Thu, 15 Nov 2007 16:47:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=551&amp;PID=1958#1958</guid>
  </item> 
 </channel>
</rss>