Hai
How can i get the hover effect on a row in ultrawebgrid
Eg:-when i moves my mouse on a row in a grid,i want to change the back colour of the hovered row.
Pls some body Help me
Regards
Rajesh Kamalakshan
Doing this with javascript is a good option, but I want to do it with css, something like this:
<DisplayLayout>
<RowStyleDefault CssClass="gridRow" />
</DisplayLayout>
Any ideas how this can be accomplished? Thx
I know it is a bit late, but in case anyone comes here via search - here is a solution to set hover style for rows using MouseOver / Out CSOM client-events, hopefully it will be useful:
I made something way sampler then your way, and it works every time.
First off set your selectedRowStyleDefault with the style you want it to appear.
After, set your mouseOver and mouseOut event handlers like you did (on 2 javascript functions).
Then in your javascript functions use this code:
function Over(tableName, itemName, type) {
if (type == 0) { // Are we over a cell
var row = igtbl_getRowById(itemName);
row.setSelected(true);
}
function Out(tableName, itemName, type)}
var grid= igtbl_getGridById(row.gridId); // Get the grid
var rowActive = grid.getActiveRow(); // Get the current active row
if (rowActive != null ) {
// We verify if there is a selection made by click, if there is, we let it selected
if (rowActive.Id != row.Id)
row.setSelected(false);
else
And this will light up any rows over!
This helped me quite a bit. I needed this very thing.
I added some 'null' checks to handle the row header problem.
Thanks!
This bombs when you hover over a header row. Any ideas on how to fix this problem?