2 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 02 Dec 2010 Link to this post

    I have a grid setup to allow users to select multiple rows clientside, I then want to loop through the selected items (server side) and take the data from each row and add it to another table.  How can I get to the data ?  Ive tried this, but it doesnt work

    private void InsertLocations()
                Telerik.Web.UI.GridItemCollection gic = this.RadGrid2.SelectedItems;
                foreach (Telerik.Web.UI.GridItem gi in gic)
                    string location = DataBinder.Eval(gi.DataItem, "Location").ToString();
  2. Daniel
    Daniel avatar
    4933 posts

    Posted 02 Dec 2010 Link to this post


    I recommend that you use the following approach:
    Hashtable table = new Hashtable();
    foreach (GridDataItem gridDataItem in RadGrid2.SelectedItems)
        string location = table["Location"].ToString();

    Let me know whether the suggested way is suitable for you

    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. DevCraft R3 2016 release webinar banner
Back to Top