<?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 : How can change the DataConverter?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : How can change the DataConverter?</description>
  <pubDate>Wed, 22 May 2013 12:32:49 -700</pubDate>
  <lastBuildDate>Tue, 10 Jun 2008 00:21:15 -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=804</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>How can change the DataConverter? : i think is rightpublic class CustomerGridBuilder...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=804&amp;PID=3050#3050</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=219" rel="nofollow">aladdin</a><br /><strong>Subject:</strong> 804<br /><strong>Posted:</strong> 10-Jun-2008 at 12:21am<br /><br />i think is right<br><br>public class <font color="#0000ff">CustomerGridBuilder</font> : <font color="#0000ff">DevExGridBuilderBase</font> {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Recipe for building the Grid.&lt;/summary&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected override void BuildCore() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StyleGridToStandard();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff">EntityPropertyDescriptors.CustomerPropertyDescriptor</font> descriptors = <font color="#0000ff">EntityPropertyDescriptors</font>.Customer;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddColumnReadOnly(descriptors.Id, "Id");<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff">IEntityEditorController</font> editor = EditorService.GetEditor(WorkItem.ID);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list = ((<font color="#0000ff">Customer</font>)editor.RootEntity).Orders;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list.ListChanged += new System.ComponentModel.<font color="#0000ff">ListChangedEventHandler</font>(list_ListChanged);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cbd = AddColumn(descriptors.ContactName, "Name");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (list.Count &gt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cbd.DataConverter = IdeaBlade.UI.<font color="#0000ff">TextConverter</font>.ReadOnlyField;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cbd.DataConverter = IdeaBlade.UI.<font color="#0000ff">TextConverter</font>.OptionalField;<br>&nbsp;&nbsp; &nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void list_ListChanged(object sender, System.ComponentModel.<font color="#0000ff">ListChangedEventArgs</font> e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (e.ListChangedType == System.ComponentModel.<font color="#0000ff">ListChangedType</font>.ItemAdded ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.ListChangedType == System.ComponentModel.<font color="#0000ff">ListChangedType</font>.ItemDeleted)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (list.Count &gt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cbd.DataConverter = IdeaBlade.UI.<font color="#0000ff">TextConverter</font>.ReadOnlyField;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cbd.DataConverter = IdeaBlade.UI.<font color="#0000ff">TextConverter</font>.OptionalField;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Get the grid column widths.&lt;/summary&gt;<br>&nbsp;&nbsp;&nbsp; protected <font color="#0000ff">IEntityEditorService</font> EditorService {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (mEditorService == null) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mEditorService = WorkItem.Services.Get&lt;<font color="#0000ff">IEntityEditorService</font>&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return mEditorService;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private <font color="#0000ff">ControlBindingDescriptor</font> cbd;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private <font color="#0000ff">ReadOnlyEntityList&lt;SizesPalletLn&gt;</font> list;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private <font color="#0000ff">IEntityEditorService</font> mEditorService;<br><br><br>]]>
   </description>
   <pubDate>Tue, 10 Jun 2008 00:21:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=804&amp;PID=3050#3050</guid>
  </item> 
  <item>
   <title>How can change the DataConverter? : Hello,the GridBuilder method add...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=804&amp;PID=2951#2951</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=219" rel="nofollow">aladdin</a><br /><strong>Subject:</strong> 804<br /><strong>Posted:</strong> 12-May-2008 at 7:51pm<br /><br />Hello,<br><br>the GridBuilder method add columns for every custom GridView we want to create,<br><br>if want to add&nbsp; read only columns use <font color="#0000ff">DataConverter.</font>ReadOnlyField ,<br><br>in my case want to add read only columns when the entity has children <br><br>how to do this ?<br><br>The View and the presenter is same for all entities, only GridBuilder is uniq, <br>the bindingsource fill after the GridBuilder...<br><br><br>]]>
   </description>
   <pubDate>Mon, 12 May 2008 19:51:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=804&amp;PID=2951#2951</guid>
  </item> 
 </channel>
</rss>