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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridListControl and simple Array

Thread ID:





38785 Dec 19,2005 02:17 PM UTC Dec 19,2005 02:29 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On December 19, 2005 02:17 PM UTC

Hello, I want a GridListControl to display the values of an array or an arraylist. sample: string[] val = new string[] {"a", "b", "c"}; gridListControl.DataSource = val; But no values are displayed. I can see 3 rows - but they are empty. Can I use an Array or an ArrayList (with valuetypes) as a GridListControl''s DataSource? Greetings Falk

stanleyj [Syncfusion]
Replied On December 19, 2005 02:29 PM UTC

Hi Falk, You can use ArrayList as DataSource, provided DisplayMember is used. Here is the code snippet for the ArrayList as DataSource to GLC. ArrayList al = new ArrayList(); al.Add(new numbers("One")); al.Add(new numbers("Two")); this.gridListControl1.DataSource = al; this.gridListControl1.DisplayMember = "Number"; // // // public class numbers { private string num; public numbers(string number) { this.num = number; } public string Number { get { return num; } } } Refer also the sample that is shipped \Syncfusion\Essential Studio\\windows\Grid.Windows\Samples\Quick Start\GridListControlSample Best regards, Stanley


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon