User Profile & Activity

Herman Cordes Member
Page
of 2
Posted: February 25, 2010 5:31 AM

Hello Handy,

Thanks for your reply. I've looked into the SmartBatchUpdate scenario, it's got almost everything I need, except for one thing. It's still updating at clientside by an AJAX call. I'd like to perform a complete page postback (because the grid lives inside a larger form and in the near future multiple grids will be added to the form). Will this also be possible with a SmartBatchUpdate?

In the meantime I found this example on the support site: http://support.intersoftpt.com/KBArticle.aspx?aid=137. Ran into some other problems with this... maybe out of the scope of this topic, so posted it in a new question http://www.intersoftpt.com/Community/WebGrid/WebGrid-BulkUpdate-with-IList-DataSource-doesnt-show-changes-on-postback/.

Thanks in advance for replies.

Regards,

Herman

Posted: January 25, 2010 3:14 AM

Allright, finally sorted it out.

All solutions with interactions to the Client API seem to work, but with some issues (see my post above). The nicest way to simulate it best, is to assign a CssClass to each RowStyle in use.

<style type="text/css">
tr[type="Record"]:hover td.GridRowStyle
{
	background-color: blue;
}
tr[type="Record"]:hover td.GridAlternateRowStyle
{
	background-color: green;
}
</style>

This Css-example sets the backgroundcolor to blue and green if hovered. It's working by assigning this layoutsettings to the WebGrid:

<LayoutSettings AlternatingColors="True">
                <AlternatingRowStyle CssClass="GridAlternateRowStyle" />
                <RowStyle CssClass="GridRowStyle" />
            </LayoutSettings>

I'd say problem solved. Anyone who thinks this solution will cause other issues, please reply! Thanks.

Posted: January 20, 2010 6:35 AM

Thank you for the attachment code and feature request (I think it would be a nice addon)! Your example works quite smoothly, unfortunatly, except for one thing.

The backgroundcolor changes to cyan on row enter and simultaneously switches the background color of other rows back to normal. Good so far. My problem occurs when the mouse pointer enters some 'empty' areas of the grid, column headers, the footer or leaves the grid control. When I do one of these actions, the cyan background color stays on the last hovered row and doesn't switch back to normal.

I've studied the code and tried some events, but can't get a descent solution yet. Still figuring out. Maybe you or someone has an idea to this?

Many thanks.

All times are GMT -5. The time now is 5:55 PM.
Previous Next