Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
wingrid custom datasource
posted

HI 

I have a entity object graph to be used as a Datasource to the UltraGrid.

for example 

Company has collection of Branches

Table Company  

               int  ComanyId

                String CompanyCode

                Address CompanyAddress

                IList Branch

Table Address

                int AddressId

                String Location

                String City

Table Branch

               int BranchId

               String BranchName

                Address BranchAddress

 

i have to show in the grid  with columns from Company and Branches as hirarchial

so Top Band should have 

CompanyId        ComanyCode          Location (Address)      City  (Address)

and child Band should have

BranchId              BranchName

 

i have around > 3000 records of IList<Company>....since, the default behaviour of ultragrid shows all public properties as columns and any IList as sub bands. i wont reach my requirements

ofcourse, i can achieve this by converting the list to DataTable......but, this requires conversion and while saving edited data have to change back as Object again...this is causing performance issue, for us object graph is huge (using Nhibernate)

can anyone help?

Thanks

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    I'm afraid I don't understand what you are asking. If you bind the grid to a list of Company objects as you have defined them here, then the grid will display it as a hierarchy, exactly as you appear to want. So... what exactly is the issue?

    Everything you are describing here is the default behavior of the grid.

Children