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

Grid List Control DataSource property

Very happy with the toolset but have found one annoyance. I want to assign Form1.gridListControl.DataSource = Form2.dsMyDataSet (where dsMyDataSet is public) using the properties window dropdown list at design time. It is not possible, as only data sets local to the present form, are shown in the dropdown list. As a workaround I am leaving it blank and assigning the DataSource (and the display member) in the code of the form load event. I acknowledge this might well be an issue with .NET, not SyncFusion, and will leave it to those better placed, to address it. Regards,

1 Reply

AD Administrator Syncfusion Team May 1, 2003 05:26 AM UTC

This behavior is inherited from .NET. If you replace the GridListControl with a Windows Forms DataGrid, you see the same behavior. To try to handle this, I think you would have to derive GridListControl and add your own custom type editior to the DataSource property that hides (with the 'new' keyword in C# or 'Shadows' in VB) the same property in the baseclass. In your custom editor, you would override CreateNewItemTypes and return whatever datasources you want to see in the list. How you get at the 'foreign' form, and its IList members would be up to you, but may take some workarounds as the .NET team did not choose to include them in their implementation.

Live Chat Icon For mobile
Up arrow icon