• About

SharePoint Lab

~ Connect, Communicate, Collaborate!!!

SharePoint Lab

Tag Archives: SSOM

SharePoint 2010: Binding GridView with multiple list

Featured

Posted by sprakibulwp in SharePoint 2010

≈ 2 Comments

Tags

SharePoint, SharePoint 2010, SSOM

To show multiple SPList data in a grid by below code:

SPList cList = spWeb.Lists.TryGetList(“Customer”);
SPList oList = spWeb.Lists.TryGetList(“Order”);

DataTable cTable = cList.Items.GetDataTable();
DataTable oTable = oList.Items.GetDataTable();

var coList = from tbl1 in cTable.AsEnumerable()
join tbl2 in oTable.AsEnumerable() on tbl1[“Title”] equals
tbl2[“CustomerName”]
select new {
ItemName = tbl2[“Title”],
CustomerName = tbl1[“Title”],
Mobile = tbl1[“MobileNo”]
};

dgvJoinList.DataSource = coList;
dgvJoinList.DataBind();

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • May 2017
  • April 2017
  • June 2013
  • November 2008

Categories

  • C# Basic
  • PowerApps
  • SharePoint 2010
  • SharePoint Online

Meta

  • Register
  • Log in

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • SharePoint Lab
    • Already have a WordPress.com account? Log in now.
    • SharePoint Lab
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar