Hello,
For a while i'm trying to creat an datagrid composite control which has
dynamicly build columns en internationalized headers. Al this works at this
moment only some problems occurs when creating an events on the datagrid
when the itemcreated event is fired. I post the code for this event below.
private void _datagrid_ItemCreated(object sender, DataGridItemEventArgs e){
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType ==
ListItemType.AlternatingItem) || (e.Item.ItemType ==
ListItemType.SelectedItem))
{
e.Item.Attributes.Add("onmouseover",
"this.style.backgroundColor='gray';this.style.curs or='hand'");
e.Item.Attributes.Add("onmouseout","this.style.bac kgroundColor='white';");
// e.Item.Attributes.Add("onclick","javascript:__doPo stBack('" +
"dw_client:" + "ctrl" + e.Item.ItemIndex + ":ctrl0','')");
}
}
When you look at the code you'll see that the mouseover en mouseevent event
work and the reaction from my control is that the color will change when
going over the columns.
The problem occurs on the doPostBack event. I continously receive the
message from IE: Object expected. I know that the problem is in the
javascript doPostBack code but i don''t know what is going wrong!
Can someone help me solving this problem.
Thnx in advance,
Martijn de Jong
The Netherlands