PC Review


Reply
Thread Tools Rate Thread

Composite datagrid control

 
 
Martijn de Jong
Guest
Posts: n/a
 
      18th May 2004
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.cursor='hand'");

e.Item.Attributes.Add("onmouseout","this.style.backgroundColor='white';");
// e.Item.Attributes.Add("onclick","javascript:__doPostBack('" +
"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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid Composite control? pnp Microsoft C# .NET 3 15th Mar 2005 07:58 PM
DataGrid In Composite Control nikboss Microsoft ASP .NET 1 17th Jun 2004 03:48 PM
Composite control datagrid Martijn de Jong Microsoft C# .NET 0 18th May 2004 03:38 PM
Composite control with dynamic composite controls sleigh Microsoft ASP .NET 1 12th Feb 2004 06:24 PM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com Microsoft ASP .NET 0 1st Jul 2003 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:27 PM.