We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Storing an arraylist in a cell

Can I store and arraylist in a cell?


3 Replies

FS Fathima Shalini P Syncfusion Team January 12, 2008 09:24 AM UTC

Hi Philip,

Thanks for your interest in Syncfusion Products.

We can bind a cell to Arraylist by using the cell type as "Control". Please find the following code that illustratrates this:


cmb = new ComboBox();
this.Controls.Add(cmb);
ArrayList list = new ArrayList();
list.Add(new MyClass(111));
list.Add(new MyClass(222));
cmb.DataSource = list;
cmb.DisplayMember = "id";
this.gridControl1[1, 1].CellType = "Control";
this.gridControl1[1, 1].Control = this.cmb;


Please have a look at the sample in the following link:

http://websamples.syncfusion.com/samples/Grid.Windows/71025/main.htm

Please let me know if any concerns.

Regards,
Fathima



PB Philip Bishop January 14, 2008 04:40 PM UTC

Ok so if I then want to copy that arraylist being held in the grid to a combobox outside the grid how would I get at the data? Do I have to loop through or is there anyway I can then move it from the grid cell to a combobox outside the grid?



FS Fathima Shalini P Syncfusion Team January 15, 2008 09:32 AM UTC

Hi Philip,

Thanks for your patience.

Currently we can retrieve the values of the combobox using loop only. We dont have any specific way to move the data outside the Grid.

Please let me know if any concerns.

Regards,
Fathima


Loader.
Live Chat Icon For mobile
Up arrow icon