empty string for nullable LinqToSql fileds, when RecordField.Type not string

  1. #1

    empty string for nullable LinqToSql fileds, when RecordField.Type not string

    I have a JsonReader field declaration

     <ext:RecordField Name="DATE_ORDER" Type="Date"/>
    declared as

    public System.Nullable<System.DateTime> DATE_ORDER
    in code behind file.

    I want to show empty string for null value in GridPanel. How can I do that?
  2. #2
    I found my problem with Date column. It's works fine, but I steel need solution with 'float' type.

     
     public System.Nullable<decimal> INVOICE_SUM{}
    
     <ext:RecordField Name="INVOICE_SUM" Type="Float"  SubmitEmptyValue="Null" />
    
     <ext:Column  Header="Invoice" DataIndex= "INVOICE_SUM" >
    
             <Renderer Fn="Ext.util.Format.numberRenderer('0,000.00')" />
             <Editor>
                    <ext:TextField runat="server" />
              </Editor>
     </ext:Column>
    For DBNull value in DB I see '0.00' in the Invoice DataPanel cell. When I submit some changes to DB INVOICE_SUM becomes '0'.
    But if I clear '0.00' to empty string on editable "Invoice" column it works the way I need. So my question is, how to show string empty instead '0.00' for null value in float column.
    I use LinqToSql generated entity class, asp:LinqDataSource and JsonReader.

Similar Threads

  1. Replies: 2
    Last Post: Jan 09, 2012, 7:18 AM
  2. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  3. Replies: 1
    Last Post: Jan 13, 2011, 11:23 AM
  4. Replies: 1
    Last Post: Aug 25, 2009, 10:27 AM
  5. Replies: 3
    Last Post: Nov 12, 2008, 5:16 AM

Posting Permissions