Link to home
Create AccountLog in
Avatar of rwheeler23
rwheeler23Flag for United States of America

asked on

C# displaying black triangle as row location indicator?

Use C# and a datagridview, is there a way to display the black triangle on any row to indicate which record the cursor currently resides? Can it be placed to the left or right or both sides of the datagridview?  I have a datagridview called dgvPayments.

ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of rwheeler23

ASKER

Then the way I set up my datagridviews is wrong because I have never seen the triangle.
Here is what I am doing:

                        dgvDataGridView.RowHeadersVisible = false;

                        dgvDataGridView.Columns[1].HeaderText = "Vendor Number";

If I set dgvDataGridView.RowHeadersVisible = true;
then do I need to setup my sql query to provide the column names?

No, the row headers have nothing to do with the content, so you don't have to change anything beyond making the row headers visible.

In this case, the content was not my concern. It was only the column headings. All looks good now.