Posts

Showing posts with the label Bind SPLIst to Grid in Sharepoint 2013

Bind SPLIst to Grid in Sharepoint 2013

private void GetCorporateOverview()         {             using (SPSite osite = new SPSite(SPContext.Current.Web.Url))             {                 using (SPWeb oweb = osite.OpenWeb())                 {                     string currentYear = DateTime.Now.Year.ToString();                     int year = Convert.ToInt32(currentYear);                     string yearvalue = Convert.ToString(year - 1);                     SPList olist = oweb.Lists.TryGetList("CorporateOverview");                     SPQuery querry = new SPQuery();             ...