DataGridView add header cell number
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: DataGridView add header cell number
With that code no errors, but the numbers are not visible
- Attachments
-
- a.jpg (23.54 KiB) Viewed 2683 times
Re: DataGridView add header cell number
i added it,
But there are continuous refresh flashes and the buttons are gone as in the picture
But there are continuous refresh flashes and the buttons are gone as in the picture
- Attachments
-
- b.jpg (54.07 KiB) Viewed 2679 times
Re: DataGridView add header cell number
Like this ?
- $dataGridView_RowPostPaint = [System.Windows.Forms.DataGridViewRowPostPaintEventHandler]{
- $dataGridView.Rows[$_.RowIndex].HeaderCell.Value = $_.RowIndex.ToString()
- }
- $dt.add_RowPostPaint($dataGridView_RowPostPaint)
- $dataGridView.DataSource = $dt
Re: DataGridView add header cell number
Where am I wrong? I do not need to add rows to GridView but to add them to the DataTable I do not have to do as I have written?
Re: DataGridView add header cell number
Sorry. I can not understand what you are doing or why you are having issues.
DO what I asked and download the PSS trial. Use it to learn how to build a form. It will get you up to speed very quickly.
DO what I asked and download the PSS trial. Use it to learn how to build a form. It will get you up to speed very quickly.
Re: DataGridView add header cell number
I downloaded pss, i try on it to catch a right code or a debug to this specific problem.
you said that i can't add datagridview, so i suppose that the problem is on this string:
If I do not have to put the rows in the DataGridView I have to include them in the DataTable, I just asked you how to put them in order to avoid the problem of continuous refresh of the rows numbers when I open the form.
you said that i can't add datagridview, so i suppose that the problem is on this string:
- $dataGridView.add_RowPostPaint($dataGridView_RowPostPaint)
Last edited by ramses147 on Fri May 26, 2017 4:18 pm, edited 1 time in total.
Re: DataGridView add header cell number
You can show on the attachment, it's very strange.
as the form refresh anytime
as the form refresh anytime
- Attachments
-
- form video screen.zip
- (485.38 KiB) Downloaded 115 times