sarya
14 years agoFrequent Contributor
How to obtain a cell's background color in datagridview table
Hi,
I need to obtain the background colour of a cell (blue in my case) when the cell is clicked. I was able to obtain the value from the object's property but not able to obtain the colour.
The table's code is like this:
.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData") .Then I used this using Log.Message but it returns nothing:Sys.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData").Rows.Item(1).DataGridView.Item(1, 0).DataGridView.BackColor ;Thanks,Sumedha
I need to obtain the background colour of a cell (blue in my case) when the cell is clicked. I was able to obtain the value from the object's property but not able to obtain the colour.
The table's code is like this:
Sys.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData")
.
Then I used this using Log.Message but it returns nothing:
Sys.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData").Rows.Item(1).DataGridView.Item(1, 0).DataGridView.BackColor ;
Thanks,
Sumedha
.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData") .Then I used this using Log.Message but it returns nothing:Sys.Process("Burster").WinFormsObject("frmViewLookupValues").WinFormsObject("SplitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("dgvData").Rows.Item(1).DataGridView.Item(1, 0).DataGridView.BackColor ;Thanks,Sumedha