473,473 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Composite control datagrid

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
Nov 16 '05 #1
0 901

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Martijn de Jong | last post by:
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...
0
by: Phil S. | last post by:
I'm having dreadful trouble putting a simple composite control into the DataGrid cell, so I'm hoping someone might have stumbled across this problem before and have some advice. My composite...
1
by: nikboss | last post by:
I have put datagrid in composite control in CreateChildMethod(). Databinding is done in page that contains my composite control, and it is done only if !IsPostBack. I have problem in post back...
1
by: Philip Townsend | last post by:
I have built a composite control containing a calendar, two dropdownlists, and a button. Currently I have only the index of each control as a means of formatting. What is the best way of formatting...
1
by: eric dugal | last post by:
Hi!! I just want to create a composite control derived from a datagrid and a one or more button on top of the grid in a table. I already tried to put my button on the createchildrenControls...
5
by: Alex Nitulescu | last post by:
Hi. Because I'm a beginner in creating controls, I spent more than two *&^#$ hours to create this "login" as a custom control and to make it work properly: ...
2
by: James T. | last post by:
Hello! I developed a composite control that inherits from HyperLink and overrides Render method. In web form I am using this control with DataGrid. On DataGrid ItemDataBound event I set...
0
by: gaurav | last post by:
hi I have created one composite control in which i am using one datagrid and other controls . In this datagrid i am rendering one check box column which fire CheckedChanged event I have created...
3
by: Eric | last post by:
I have created a fairly basic composite control consisting of a Label and a TextBox. In the overridden Render function, I'm creating a table with two rows and each row contains a cell (td). The...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.