You need to put the strings into an object that implements IEnumerable (such as a List<string>), then you can just DataBind the list to the DataGridView.
You need to put the strings into an object that implements IEnumerable (such as a List<string>), then you can just DataBind the list to the DataGridView.
Hi CGKevin:
If i have a List of string named str, how can I put his items in datagridview rows with datagrid virtual Mode?
The upshot is that if you are going to use virtual mode, that means you are not going to allow the DataGrid to manage it's data binding, you are going to code the DataGrid's data access yourself. While there are legitimate resons to do this, if you are a beginner, unless you have a compelling reason, you should probably allow the DataGrid to handle data access via it's built in data binding. The MS example gives you all the code you need to program the virtual mode of the DataGridView. I'm not sure what my re-writing that code would do for you.
Bookmarks