G
Guest
Is it possible to change the background color of the DataGrid on pointing the
mouse over a certain row?
mouse over a certain row?
Eliyahu Goldin said:You need to setup client side onmouseover and onmouseout events for changing
grid row visual properties or style. To setup the events you need to access
grid rows in either ItemDataBound or PreRender server-side event and set
Attributes["onmouseover"] and Attributes["onmouseout"] to appropriate
javascript statements.
Eliyahu
rkbnair said:Is it possible to change the background color of the DataGrid on pointing the
mouse over a certain row?
Eliyahu Goldin said:You need to setup client side onmouseover and onmouseout events for changing
grid row visual properties or style. To setup the events you need to access
grid rows in either ItemDataBound or PreRender server-side event and set
Attributes["onmouseover"] and Attributes["onmouseout"] to appropriate
javascript statements.
Eliyahu
rkbnair said:Is it possible to change the background color of the DataGrid on pointing the
mouse over a certain row?
rkbnair said:I said:
MyDataGrid.Attributes.Add ("mouseover", ?????????????????????);
But, how can I change the color of the current row to blue?
Eliyahu Goldin said:You need to setup client side onmouseover and onmouseout events for changing
grid row visual properties or style. To setup the events you need to access
grid rows in either ItemDataBound or PreRender server-side event and set
Attributes["onmouseover"] and Attributes["onmouseout"] to appropriate
javascript statements.
Eliyahu
pointingrkbnair said:Is it possible to change the background color of the DataGrid on
themouse over a certain row?
Eliyahu Goldin said:You can prepare css styles and change className property. Or you set
background property directly:
MyDataGrid.Attributes.Add ("mouseover",
"this.style.backgroundColor='blue'");
Eliyahu
rkbnair said:I said:
MyDataGrid.Attributes.Add ("mouseover", ?????????????????????);
But, how can I change the color of the current row to blue?
Eliyahu Goldin said:You need to setup client side onmouseover and onmouseout events for changing
grid row visual properties or style. To setup the events you need to access
grid rows in either ItemDataBound or PreRender server-side event and set
Attributes["onmouseover"] and Attributes["onmouseout"] to appropriate
javascript statements.
Eliyahu
Is it possible to change the background color of the DataGrid on pointing
the
mouse over a certain row?
As I said,. either in ItemDataBound or PreRender event.Also, where should I define this line. (in the page_load?)
Eliyahu Goldin said:You can prepare css styles and change className property. Or you set
background property directly:
MyDataGrid.Attributes.Add ("mouseover",
"this.style.backgroundColor='blue'");
Eliyahu
rkbnair said:I said:
MyDataGrid.Attributes.Add ("mouseover", ?????????????????????);
But, how can I change the color of the current row to blue?
:
You need to setup client side onmouseover and onmouseout events for changing
grid row visual properties or style. To setup the events you need to access
grid rows in either ItemDataBound or PreRender server-side event and set
Attributes["onmouseover"] and Attributes["onmouseout"] to appropriate
javascript statements.
Eliyahu
Is it possible to change the background color of the DataGrid on pointing
the
mouse over a certain row?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.