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.
Unfortunately, activation email could not send to your email. Please try again.

Storing an arraylist in a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

71025 Jan 11,2008 04:14 PM Jan 15,2008 04:32 AM Windows Forms 3
loading
Tags: GridControl
Philip Bishop
Asked On January 11, 2008 04:14 PM

Can I store and arraylist in a cell?


Fathima Shalini P [Syncfusion]
Replied On January 12, 2008 04:24 AM

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


Philip Bishop
Replied On January 14, 2008 11:40 AM

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?


Fathima Shalini P [Syncfusion]
Replied On January 15, 2008 04:32 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;