471,337 Members | 1,134 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Data Grid question.. SIMPLE!

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?
Nov 28 '05 #1
1 950
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

Nov 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Da-Breegster | last post: by
1 post views Thread by Sunny | last post: by
6 posts views Thread by Hutty | last post: by
3 posts views Thread by pmud | last post: by
8 posts views Thread by Doug Bell | last post: by
1 post views Thread by Jason | last post: by
3 posts views Thread by vineetbatta | last post: by
9 posts views Thread by Anil Gupte | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.