Data Grid question.. SIMPLE!

  • Thread starter Thread starter B. Cavour
  • Start date Start date
B

B. Cavour

Ok, I need the first row/colum cell's text to be highlighted when the forms
starts. I know how to get cell & row to highlight, BUT, I just need the
Text to highlight.

Any ideas of where to look for this property?
 
It is a little hard to tell what you are talking about...

Plain text can be manipulated by tags (such as <B>) and parent elements
(like rows, columns, spans, textboxes, etc) but is not itself an HTML
element and so cannot be altered directly.

So you must be talking about something else.

Regardless... You can access your datagrid's data and/or controls with
complete granularity by referencing it directly AFTER data binding.

eg. If I had a textbox control in the first column of the first row and
I wanted to select it's text:

((TextBox)
myDataGrid.Items[0].Cells[0].Controls[0]).Attibutes.Add("onload",
"this.select()");

The cast to Textbox is unnecessary, just there to show that you can
also access any members of the particular class of control at the
location.

btw. I didn't test that code, but if it doesn't work OOB, the gist of
it is correct.

Good Luck.
-Jerry
 
Back
Top