Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
i make a list with generic class name Generic<t,u>
and make object like this
Generic<string,> sGString = new Generic<string,>(3);
i want to add data in DataGrideView which will add in GString
plz help me
Posted 7-Dec-12 3:19am
Simon_Whale at 7-Dec-12 9:26am
are you on about using list < T >?
Sergey Alexandrovich Kryukov at 7-Dec-12 15:34pm
What is the definition of "Generic". Is it your generic class? There is no such thing in FCL...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

List<generic> sGList = new List<generic>();
dataGridView1.Datasource = typeof(BindingList<>);
dataGridView1.Datasource = sGList;
Now when you add an item to the datagridview, it should add to the list. (If I understand your question correctly);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150129.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100