This is a migrated thread and some comments may be shown as answers.

Rad Grid cell value need to save an array

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prassin
Top achievements
Rank 1
Prassin asked on 08 Aug 2012, 06:48 AM
Hi All,

I have a Rad Grid and its having 3 columns (ItemID, ItemCode, ItemName) i wish to get the all row values of ItemID and the value need set to an array in a private function....
how can i achieve this .. please help..

Regards,

Prassin

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Aug 2012, 08:07 AM
Hi,

You can get the row value in an ArrayList as shown below.
C#:
private ArrayList sample()
   {
       ArrayList list = new ArrayList();
       foreach (GridDataItem item in RadGrid1.Items)
       {
           TableCell cell = (TableCell)item["ItemID"];
           list.Add(cell.Text);
       }
       return list;
   }

Thanks,
Shinu.
Tags
Grid
Asked by
Prassin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or