New updates to ADC controls (ADC series - Part IV)
When ADC was first released, it had an pretty impressive set of features, sorting, paging, animation, dragging and dropping, client-side databinding.
As time went by, ADC team has added bits and pieces of updates.
1. Enable referencing to an ADC control using its client-name. Sonu uploaded the changes on July 18, 2008. Because it is no fun to reference your control using $find("gridview1"), now instead, you can directly bind a datasource to ADC by its ID, for example:
Gridview1.DataSource = myDataSource.
2. Add onMouseOver, onMouseOut as part of the ADC controls' events, so instead of manully attaching the mouseOver events to a GridView's RowCreatedEvent, coding like the following:
//change css style of a gridview row when mouse over/mouse out
function onRowCreated(sender, e)
{
if (e.get_row().get_isDataRowType())
{
var row = e.get_row();
var tr = row.get_container();
tr.onmouseover = function(){ this.className = 'rowMouseOver' };
tr.onmouseout = function(){ this.className = 'rowMouseOut' };
}
}
We do the following:
<AjaxData:GridView ID="GridView1" runat="server" CssClass="DataWebControlStyle" CellSpacing="0" CellPadding="3" RowMouseOverEvent="onRowMouseOver"
RowMouseOutEvent="onRowMouseOut">
Of course, you have to define you own onRowMouseOver and onRowMouseOut functions.
function onRowMouseOver(sender, e)
{
}
...
Putting it all together, an example of GridView with MouseOver / MouseOut events:
See it how it runs:
please read my other posts about ADC:
