473,387 Members | 1,456 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,387 software developers and data experts.

Double-click event in datagrid?

Hi all,

Can anyone tell me how I can detect the double_click event in a datagrid
CELL. I have a read-only bound grid that appears to only receive the event
if you double_click the header or in between a row...

I'm basically trying to retrieve the value of the underlying row to retrieve
a record selection.

Any help would be appreciated.

Thanks,
Graham
Jul 21 '05 #1
5 4610
Hi,
Chk the following link ....
http://authors.aspalliance.com/das/d...ddblclick.aspx
i suppose it would help you.

regards
Subramanian
-----Original Message-----
Hi all,

Can anyone tell me how I can detect the double_click event in a datagridCELL. I have a read-only bound grid that appears to only receive the eventif you double_click the header or in between a row...

I'm basically trying to retrieve the value of the underlying row to retrievea record selection.

Any help would be appreciated.

Thanks,
Graham
.

Jul 21 '05 #2
Hi Graham,

You can try to use a textbox in the datagrid and than use the event from
that.

I made once a sample with a tooltip in the datagrid column so maybe you can
change that yourself and try if it works.

I hope this helps?

Cor

\\\
Private WithEvents dtbCol1 As DataGridTextBox
Private ToolTip1 As New ToolTip
')
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Datagrid1.ReadOnly = True
Dim ts As New DataGridTableStyle
ts.MappingName = ds.Tables(0).TableName
Dim column As New DataGridTextBoxColumn
ts.GridColumnStyles.Add(column)
DataGrid1.TableStyles.Add(ts)
column = DirectCast(ts.GridColumnStyles(0), DataGridTextBoxColumn)
dtbCol1 = DirectCast(column.TextBox, DataGridTextBox)
column.MappingName = ds.Tables(0).Columns(0).ColumnName
column.HeaderText = "Cor"
column.Width = 30
dv = New DataView(ds.Tables(0))
dv.AllowNew = False
DataGrid1.DataSource = dv
End Sub
Private Sub dtbCol1_ToolTip(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles dtbCol1.MouseEnter
ToolTip1.SetToolTip(DirectCast(sender, DataGridTextBox), _
"Row: " & DataGrid1.CurrentRowIndex + 1)
End Sub
///
Jul 21 '05 #3
Hi..
I think the ASP class is diferent from the windows form class of the
datagrid... there doesn't appear to be a ItemDataBound method for the
windows form version..
unless I'm missing something...

If you happend to come across a windows form solution I'd appreciate any
input.

Thanks,
Graham

"Subramanian" <av******@discussions.rediffmail.com> wrote in message
news:14*****************************@phx.gbl...
Hi,
Chk the following link ....
http://authors.aspalliance.com/das/d...ddblclick.aspx
i suppose it would help you.

regards
Subramanian
-----Original Message-----
Hi all,

Can anyone tell me how I can detect the double_click

event in a datagrid
CELL. I have a read-only bound grid that appears to only

receive the event
if you double_click the header or in between a row...

I'm basically trying to retrieve the value of the

underlying row to retrieve
a record selection.

Any help would be appreciated.

Thanks,
Graham
.

Jul 21 '05 #4
Hi Graham,

I sended a sample for a Window form, is there something wrong with that?

Cor
Jul 21 '05 #5
Hi,

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q869q

Ken
-----------------
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:VF*********************@news20.bellglobal.com ...
Hi all,

Can anyone tell me how I can detect the double_click event in a datagrid
CELL. I have a read-only bound grid that appears to only receive the event
if you double_click the header or in between a row...

I'm basically trying to retrieve the value of the underlying row to
retrieve
a record selection.

Any help would be appreciated.

Thanks,
Graham

Jul 21 '05 #6

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

Similar topics

12
by: Sydex | last post by:
When I compile code I get error C2664: 'Integration::qgaus' : cannot convert parameter 1 from 'double (double)' to 'double (__cdecl *)(double)' in this part : double Integration::quad2d(double...
20
by: Anonymous | last post by:
Is there a non-brute force method of doing this? transform() looked likely but had no predefined function object. std::vector<double> src; std::vector<int> dest; ...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
10
by: Robert Palma | last post by:
I'm having trouble figuring out how to pass a pointer to a double array (1 dimensional) to a C function. Declaring array as: double xx; Declaring func. int process( double *input ) Calling...
10
by: Bryan Parkoff | last post by:
The guideline says to use %f in printf() function using the keyword float and double. For example float a = 1.2345; double b = 5.166666667; printf("%.2f\n %f\n", a, b);
3
by: BlueTrin | last post by:
I am using a DLL written in C, it uses some pointers on functions, I have defined a wrapper around it in C# which uses some delegates: #region Delegates and Marshalling to call solvopt public...
67
by: lcw1964 | last post by:
This may be in the category of bush-league rudimentary, but I am quite perplexed on this and diligent Googling has not provided me with a clear straight answer--perhaps I don't know how to ask the...
1
by: JWest46088 | last post by:
I keep getting these error messages: area(double,double) in Rectangle cannot be applied to () return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ...
2
by: dj10fld | last post by:
I am getting a (cannot convert double to double in assignment errors) here is a part of my code #include <iostream> #include <iomanip> #include <cmath> using namespace std; #define MaxSize...
2
by: Genro | last post by:
#include<stdio.h> #include<TX/graphics.h> #include<time.h> // I need help! struct Krug{ double _x; double _y; double _skox; double _skoy; double...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.