I have a data grid on one of my programs. I use the "Data Access Application Block"(DAAB) from Microsoft to talk to the SQL Server database. Here is the code I have so far to Fill the DataGrid:
Dim ds As DataSet = SqlHelper.ExecuteDataset(Connection, CommandType.StoredProcedure, "spLoadUserData")
DataGrid1.DataSource = ds
Here are the questions I have
1) I see the data fine, but I have to press the plus sign and then click the table to see the data. When I load the form I want it to load the data to the form without clicking anything. How do I do this?
2) How do I change the column widths? There are say 5 fields and all 5 fields should be different widths.
3) If the operator selects a row, how do I read it? Also how do I delete the selected row? The form will have a button to delete the selected record. Also the operator should have no access to edit the data. All they can do is select the data and delete it.
Dim ds As DataSet = SqlHelper.ExecuteDataset(Connection, CommandType.StoredProcedure, "spLoadUserData")
DataGrid1.DataSource = ds
Here are the questions I have
1) I see the data fine, but I have to press the plus sign and then click the table to see the data. When I load the form I want it to load the data to the form without clicking anything. How do I do this?
2) How do I change the column widths? There are say 5 fields and all 5 fields should be different widths.
3) If the operator selects a row, how do I read it? Also how do I delete the selected row? The form will have a button to delete the selected record. Also the operator should have no access to edit the data. All they can do is select the data and delete it.