Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i make a list with generic class name Generic<t,u>
and make object like this

Generic<string,> sGString = new Generic<string,>(3);
GString.Add(txtT.Text,txtU.Text);

i want to add data in DataGrideView which will add in GString

plz help me
Posted
Comments
Simon_Whale 7-Dec-12 9:26am    
are you on about using list < T >?
Sergey Alexandrovich Kryukov 7-Dec-12 15:34pm    
What is the definition of "Generic". Is it your generic class? There is no such thing in FCL...
--SA

1 solution

C#
List<generic> sGList = new List<generic>();
dataGridView1.Datasource = typeof(BindingList<>);
dataGridView1.Datasource = sGList;
dataGridView1.Refresh();


Now when you add an item to the datagridview, it should add to the list. (If I understand your question correctly);
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900