Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Bind Multiple to a gridview

$
0
0

Hi All

I want to get some random records from a specific list. I am able to get the record but due to some business reasons i need to write three different sp queries. but now the issue is I am not able to build the three different items to a single gridview. Below is the code.

IOrderedEnumerable<SPListItem> Items_Introduction = myList.GetItems(query_Introduction)
                                                         .Cast<SPListItem>()
                                                         .AsEnumerable()
                                                         .OrderBy((i => rnd.Next()));
              IOrderedEnumerable<SPListItem> Items_Closure = myList.GetItems(query_Closure)
                                                      .Cast<SPListItem>()
                                                      .AsEnumerable()
                                                      .OrderBy((i => rnd.Next()));
              IOrderedEnumerable<SPListItem> Items_RCA = myList.GetItems(query_RCA)
                                                 .Cast<SPListItem>()
                                                 .AsEnumerable()
                                                 .OrderBy((i => rnd.Next()));

             

GridView1.DataSource = Items_Introduction.Concat(Items_RCA);

              GridView1.DataBind();

I am able to concat only two collections but not the other..

Can someone please suggest on this.

Thanks & Regards

Rakesh


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>