If I have a datagridview that is bound to a dataset which comes from a MSSQL database, how can I have the datagridview display only one row of data from the dataset rather than all of the rows?
Specifically, the first column is a combobox which is bound to the items in the dataset. When the datagridview loads, it displays as many rows as there are items in the dataset. I need to display only one row, allow the user to select an item from the combobox and enter through the rest of the columns in the row, and then add another row after that.
Jump to Post
Don't bounds the combobox to the dataset. by a loop read the table and add the value of the datafield to the combobox at the time of loading of the form. Then add a row->choose item from combobox and go through the other cells. No need to load data everytime …
All 2 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.