Hi folks
Working on a new project in VB.NET 2008, and trying to display data from a Table in a DataGridView control.
I don't want to display everything in the table, just some records where a specific field (Selected) has a value of "X". I was having trouble with that so I added a DataView and set the filter to Selected = "X". That got me the data I wanted, but it's proving a problem to show updates in the grid when new records are added programmatically.
A second problem I have is in trying to set up the columns. I am trying to pre-define the column headers and field names to the values of the fields in the dataview being passed but they don't get filled, the data gets added on with extra columns after the preset columns are displays (empty). These are unbound fields because the recordset, table and DataView is not predefined, it's done in a query string.
Would love some help trying to figure out how to make this work.
CraigHartz
Working on a new project in VB.NET 2008, and trying to display data from a Table in a DataGridView control.
I don't want to display everything in the table, just some records where a specific field (Selected) has a value of "X". I was having trouble with that so I added a DataView and set the filter to Selected = "X". That got me the data I wanted, but it's proving a problem to show updates in the grid when new records are added programmatically.
A second problem I have is in trying to set up the columns. I am trying to pre-define the column headers and field names to the values of the fields in the dataview being passed but they don't get filled, the data gets added on with extra columns after the preset columns are displays (empty). These are unbound fields because the recordset, table and DataView is not predefined, it's done in a query string.
Would love some help trying to figure out how to make this work.
CraigHartz