By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,929 Members | 1,830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,929 IT Pros & Developers. It's quick & easy.

Highlight a selected row

P: n/a
Hi,

I have a datagrid which contains 3 columns. Two of them are Bound Column
types and the third one is Button Column. When I click on one of the rows in
that Button Column, I would like to highlight that row. I have already set
the SelectedItemStyle property in the designer But I am knowing when it will
work. It is not highlighting the row. If I highlight the row inside the
datagrid1_ItemCommand event using e.Item.BackColor =
datagrid1.SelectedItemStyle.BackColor, e.Item.ForeColor =
datagrid1.SelectedItemStyle.ForeColor then it is highlighting the row but the
problem is when I click on another row it is not removing the highlighted
colors from the previously selected row. It is highlighting all the rows that
were clicked until then. please let me know how to do that.

Thanks,
Sridhar.
Dec 27 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
For the “ButtonColumn” attempt to set the “CommandName” property to a
"Select" value.

Alexey Borzenkov (http://alexborzenkov.iespana.es/)

"Sridhar" wrote:
Hi,

I have a datagrid which contains 3 columns. Two of them are Bound Column
types and the third one is Button Column. When I click on one of the rows in
that Button Column, I would like to highlight that row. I have already set
the SelectedItemStyle property in the designer But I am knowing when it will
work. It is not highlighting the row. If I highlight the row inside the
datagrid1_ItemCommand event using e.Item.BackColor =
datagrid1.SelectedItemStyle.BackColor, e.Item.ForeColor =
datagrid1.SelectedItemStyle.ForeColor then it is highlighting the row but the
problem is when I click on another row it is not removing the highlighted
colors from the previously selected row. It is highlighting all the rows that
were clicked until then. please let me know how to do that.

Thanks,
Sridhar.

Dec 27 '05 #2

P: n/a
Thanks alot. I have been trying this since the morning.

"Alexey Borzenkov" wrote:
For the “ButtonColumn” attempt to set the “CommandName” property to a
"Select" value.

Alexey Borzenkov (http://alexborzenkov.iespana.es/)

"Sridhar" wrote:
Hi,

I have a datagrid which contains 3 columns. Two of them are Bound Column
types and the third one is Button Column. When I click on one of the rows in
that Button Column, I would like to highlight that row. I have already set
the SelectedItemStyle property in the designer But I am knowing when it will
work. It is not highlighting the row. If I highlight the row inside the
datagrid1_ItemCommand event using e.Item.BackColor =
datagrid1.SelectedItemStyle.BackColor, e.Item.ForeColor =
datagrid1.SelectedItemStyle.ForeColor then it is highlighting the row but the
problem is when I click on another row it is not removing the highlighted
colors from the previously selected row. It is highlighting all the rows that
were clicked until then. please let me know how to do that.

Thanks,
Sridhar.

Dec 27 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.