CodeSmith Community
Your Code. Your Way. Faster!

Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

Latest post 05-08-2007 10:18 AM by GRAW. 4 replies.
  • 01-17-2007 8:18 AM

    • ngoctn
    • Not Ranked
    • Joined on 06-23-2006
    • Posts 3
    • Points 160

    Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

    I'm using TList<> object to bind an entity collection to a UltraGrid by using BindingSource class (by an advice from Infragistics). But when a database field can have null value, UltraGrid can't detect what type of Ultra column is. Please  help me solve this problem. Thanks in adv!
     

    • Post Points: 90
  • 01-17-2007 11:54 AM In reply to

    Re: Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

    What do you mean it can't detect the type of column?  The property descriptors are set and are there for usage.  Can you post the actual error message you see?

    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
  • 05-07-2007 11:13 PM In reply to

    • huwko
    • Not Ranked
    • Joined on 04-25-2007
    • Posts 2
    • Points 40

    Re: Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

    TList list=CustomerSv.GetAll(); ugGuarantee.Text = "Title Grid"; ugGuarantee.DisplayLayout.CaptionAppearance.FontData.Bold = DefaultableBoolean.True; Ultragrid1.DataSource = VeinsrList; ... i hope help you ...ok
    • Post Points: 5
  • 05-07-2007 11:28 PM In reply to

    • huwko
    • Not Ranked
    • Joined on 04-25-2007
    • Posts 2
    • Points 40

    Re: Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

    TableService service=new TableService (); 

    TList<Table> List=service.GetAll();

    Ultragrid.DataSource = List;

    • Post Points: 35
  • 05-08-2007 10:18 AM In reply to

    • GRAW
    • Top 25 Contributor
    • Joined on 06-23-2006
    • Posts 157
    • Points 4,560

    Re: Nettier & Infragistics 2006 V3 for .Net 2.0 , Please help me now!!!

    We use infragistics controls and they work.  However we don't bind directly to the ultra controls, we use the BindingSource objects available in .Net 2.0 for binding.

    So, assuming you drag a BindingSource on your design surface, you point the UltraGrid's DataSource to the BindingSource, and then set the TList<> to the BindingSource's DataSource.

    In order to get Infragistics to generate columns based on your type, while in design mode, you can set the DataSource of the BindingSource to the type of the object you're going to bind to.

    A lot of this should be done by/through the designer, but I'm  going to code a rough sketch for you:

     

    BindingSource tableBindingSource = new BindingSource();

    tableBindingSource.DataSource = typeof(Table);

    Ultragrid1.DataSource = tableBindingSource;

     

    Then whenever you get your actual data, u just set the BidindingSource's DataSource as follows:

    tableBindingSource.DataSource = new TableService().GetAll(); 

    "Small is the number of them that see with their own eyes, and feel with their own hearts" Albert Einstein
    • Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems