CodeSmith Community
Your Code. Your Way. Faster!

Facing Problem to get data using DeepLoad method

Latest post 06-30-2008 7:57 AM by JoyalJJ. 1 replies.
  • 06-30-2008 4:55 AM

    • JoyalJJ
    • Not Ranked
    • Joined on 06-30-2008
    • Posts 3
    • Points 15

    Facing Problem to get data using DeepLoad method

    I am using DeepLoad.

    I know that, i can use data of related tables of the master table by using DeepLoad.
    cms.DeepLoad(cmList,
    true, DeepLoadType.IncludeChildren, typeof(ClientMaster));

     Can anyone tell me that, how can i got data in gridview?

    Gridview.DataSource = cms.DeepLoad(cmList, true, DeepLoadType.IncludeChildren, typeof(ClientMaster)); will not work because DeepLoad method's return type is void.

    Means, i want to know how do we have DeepLoad data back or how can we use data which are generated or filtered through DeepLoad.

    I am waiting for your reply and expect it asap.

    Thanks.


    Joyal

    • Post Points: 5
  • 06-30-2008 7:57 AM In reply to

    • JoyalJJ
    • Not Ranked
    • Joined on 06-30-2008
    • Posts 3
    • Points 15

    Re: Facing Problem to get data using DeepLoad method

    Greetings......................................................... 

    I have solved the above problem by myself only.

                myEntityMaster cmEntity = new myEntityMaster();
                myEntityMasterService cms = new myEntityMasterService();
                TList<myEntityMaster> cmList = new TList<myEntityMaster>();
                cmList = cms.GetAll();
                cms.DeepLoad(cmList, false, DeepLoadType.IncludeChildren, typeof(ClientMaster));
                foreach (myEntityMaster cm in cmList)
                {
                    if(cm.ClientIdSource != null)
                        Response.Write("ClientName: - " + Convert.ToString(cm.ClientIdSource.ClientName) + "<br>");
                }
                GridView1.DataSource = cmList;
                GridView1.DataBind(); 

    So, i need to display client name from rowdatabound event of the gridview.

    Thanks.

    Joyal

    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems