473,414 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

double click and datagrid

kgs
I have datagrid with in a usercontrol.
I have doubleclick event tied to each row to post back
with the id of the control.

Though i get a postback on double click of the datagrid
But double click event handler is not triggered.

here is the code snipped for item bound
public void OnItemBound(Object Sender,
DataGridItemEventArgs e)
{
ListItemType itemType = e.Item.ItemType;

if (itemType == ListItemType.AlternatingItem ||itemType
== ListItemType.SelectedItem ||itemType ==
ListItemType.Item )
{

TableRow rw= e.Item;
if(dblClick!=null)
rw.Attributes["onclick"]="javascript:__doPostBack
('"+this.ClientID+"','"+Convert.ToString(e.Item.It emIndex)
+"');";
any clues
thanks!!
Nov 18 '05 #1
1 1874
kgs
this fixed it.
rw.Attributes["ondblclick"]
= "javascript:"+Page.GetPostBackEventReference
(this,Convert.ToString(e.Item.ItemIndex));
Thanks all
-----Original Message-----
I have datagrid with in a usercontrol.
I have doubleclick event tied to each row to post back
with the id of the control.

Though i get a postback on double click of the datagrid
But double click event handler is not triggered.

here is the code snipped for item bound
public void OnItemBound(Object Sender,
DataGridItemEventArgs e)
{
ListItemType itemType = e.Item.ItemType;

if (itemType == ListItemType.AlternatingItem ||itemType
== ListItemType.SelectedItem ||itemType ==
ListItemType.Item )
{

TableRow rw= e.Item;
if(dblClick!=null)
rw.Attributes["onclick"]="javascript:__doPostBack
('"+this.ClientID+"','"+Convert.ToString(e.Item.I temIndex)
+"');";
any clues
thanks!!
.

Nov 18 '05 #2

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

Similar topics

3
by: Maulin Vasavada | last post by:
Hi, I have DataTable and I want to actually put a LinkLabel in one the columns where I can click an do something BUT it seems I can't put LinkLabel in the table cell of DataTable. So as an...
1
by: mdb | last post by:
I need to detect when the user double-clicks on a cell in a DataGrid in WindowsForms, but the doubleClick event doesn't seem to respond when its in the data area. (It does respond if I double...
1
by: Lalit Bhatia | last post by:
Hi when focus is on a cell in datagrid. double click event does not occur. when I double click on rowheader, columnheader then this event fires. I am using DataGridTableStyle in the grid. ...
2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
1
by: Manny Chohan | last post by:
hi Guys, i want to implement the double click functionality in datagrid. I am using c#. can some one recomend a good article whihc shows you how to do it. Thanks Manny
5
by: Francois Searle | last post by:
Hi I have a datagrid that is popolated by a search result. I would then like to double click on a row to open the record in a new form. The double click doesn't seem to "fire"? I am relively...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
1
by: Brett Romero | last post by:
I'm allowing double clicks on a DataGrid by using a counter and timing. However, the user must click two different cells for the double click to work. The reason is once they click into a cell, it...
1
by: trint | last post by:
Hi, I have three datagrids in a WinForm. I want dataGridView1 to retrieve data and make dataGridView2 visible and the same with dataGridView3. Any help is appreciated. Thanks, Trint
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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...

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.