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

cell double click

which data control allows me to use a cell doubleClick event?

I have time cells (something like Outlook calendar) and when user double
click on one cell I would like to redirect to other window where he could
insert events for that time. Then he go back to that page and see event in
that cell.

How can I do that?

Thank you,
Simon
Nov 18 '05 #1
4 2417
The html would be something like

<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td
onDblClick="javascript:window.location='http://www.google.com'">Double Click
this cell</td>
</tr>
</table>

Now to get that in a data bound control...
Perhaps with
..attributtes.add("onDblClick","javascript:window. location='/yourInsertEventP
age.aspx'")

On the relevant cell, during itemcreated or itemdatabound

"simon" <si*********@stud-moderna.si> wrote in message
news:eM**************@TK2MSFTNGP12.phx.gbl...
which data control allows me to use a cell doubleClick event?

I have time cells (something like Outlook calendar) and when user double
click on one cell I would like to redirect to other window where he could
insert events for that time. Then he go back to that page and see event in
that cell.

How can I do that?

Thank you,
Simon

Nov 18 '05 #2
Thank you for your answer. Attributes.Add has only dataGrid( before I had
dataRepeater).
Now I would like that function test is executed when user doubleClicks on
the cell.
I must know which cell is, that I can insert events for that cell (time in
fact, because each cell represent the hour of a day) so I use
e.Item.itemIndex. But this code doesn't work.

Do you know why?

Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

DataGrid1.Attributes.Add("onDblClick", test(e.Item.ItemIndex))

End Sub

Function test(ByVal indeks)

label1.Text = indeks

End Function

Thank you,

Simon

"Joe Gass" <jo*@dontspamme.com> wrote in message
news:uA*************@tk2msftngp13.phx.gbl...
The html would be something like

<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td
onDblClick="javascript:window.location='http://www.google.com'">Double Click this cell</td>
</tr>
</table>

Now to get that in a data bound control...
Perhaps with
..attributtes.add("onDblClick","javascript:window. location='/yourInsertEventP age.aspx'")

On the relevant cell, during itemcreated or itemdatabound

"simon" <si*********@stud-moderna.si> wrote in message
news:eM**************@TK2MSFTNGP12.phx.gbl...
which data control allows me to use a cell doubleClick event?

I have time cells (something like Outlook calendar) and when user double
click on one cell I would like to redirect to other window where he could insert events for that time. Then he go back to that page and see event in that cell.

How can I do that?

Thank you,
Simon


Nov 18 '05 #3
Hello,

I tried your example, it works ok, but I need to redirect to the page with
ID of clicked cell

If I try like this, I always get the ID of the last cell:

Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

If e.Item.ItemIndex <> -1 Then

Dim key As String = DataGrid1.DataKeys(e.Item.ItemIndex).ToString()

DataGrid1.Attributes.Add("onDblClick", "test('" & key & "')")

End If

End Sub

and on page:

<SCRIPT language="javascript">

function test(id)

{

window.location='http://www.redirectPage.aspx?id="+id

}

</SCRIPT>

Or with other words, How can I know which cell was double clicked?

Thank you,

Simon

"simon" <si*********@stud-moderna.si> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
Thank you for your answer. Attributes.Add has only dataGrid( before I had
dataRepeater).
Now I would like that function test is executed when user doubleClicks on
the cell.
I must know which cell is, that I can insert events for that cell (time in
fact, because each cell represent the hour of a day) so I use
e.Item.itemIndex. But this code doesn't work.

Do you know why?

Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

DataGrid1.Attributes.Add("onDblClick", test(e.Item.ItemIndex))

End Sub

Function test(ByVal indeks)

label1.Text = indeks

End Function

Thank you,

Simon

"Joe Gass" <jo*@dontspamme.com> wrote in message
news:uA*************@tk2msftngp13.phx.gbl...
The html would be something like

<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td
onDblClick="javascript:window.location='http://www.google.com'">Double Click
this cell</td>
</tr>
</table>

Now to get that in a data bound control...
Perhaps with

..attributtes.add("onDblClick","javascript:window. location='/yourInsertEventP
age.aspx'")

On the relevant cell, during itemcreated or itemdatabound

"simon" <si*********@stud-moderna.si> wrote in message
news:eM**************@TK2MSFTNGP12.phx.gbl...
which data control allows me to use a cell doubleClick event?

I have time cells (something like Outlook calendar) and when user double click on one cell I would like to redirect to other window where he could insert events for that time. Then he go back to that page and see
event in that cell.

How can I do that?

Thank you,
Simon



Nov 18 '05 #4
Hello,

I tried your example, it works ok, but I need to redirect to the page with
ID of clicked cell

If I try like this, I always get the ID of the last cell:

Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

If e.Item.ItemIndex <> -1 Then

Dim key As String = DataGrid1.DataKeys(e.Item.ItemIndex).ToString()

DataGrid1.Attributes.Add("onDblClick", "test('" & key & "')")

End If

End Sub

and on page:

<SCRIPT language="javascript">

function test(id)

{

window.location='http://www.redirectPage.aspx?id="+id

}

</SCRIPT>

Or with other words, How can I know which cell was double clicked?

Thank you,

Simon

"simon" <si*********@stud-moderna.si> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
Thank you for your answer. Attributes.Add has only dataGrid( before I had
dataRepeater).
Now I would like that function test is executed when user doubleClicks on
the cell.
I must know which cell is, that I can insert events for that cell (time in
fact, because each cell represent the hour of a day) so I use
e.Item.itemIndex. But this code doesn't work.

Do you know why?

Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemCreated

DataGrid1.Attributes.Add("onDblClick", test(e.Item.ItemIndex))

End Sub

Function test(ByVal indeks)

label1.Text = indeks

End Function

Thank you,

Simon

"Joe Gass" <jo*@dontspamme.com> wrote in message
news:uA*************@tk2msftngp13.phx.gbl...
The html would be something like

<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td
onDblClick="javascript:window.location='http://www.google.com'">Double Click
this cell</td>
</tr>
</table>

Now to get that in a data bound control...
Perhaps with

..attributtes.add("onDblClick","javascript:window. location='/yourInsertEventP
age.aspx'")

On the relevant cell, during itemcreated or itemdatabound

"simon" <si*********@stud-moderna.si> wrote in message
news:eM**************@TK2MSFTNGP12.phx.gbl...
which data control allows me to use a cell doubleClick event?

I have time cells (something like Outlook calendar) and when user double click on one cell I would like to redirect to other window where he could insert events for that time. Then he go back to that page and see
event in that cell.

How can I do that?

Thank you,
Simon



Nov 18 '05 #5

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. ...
0
by: Tony Fields | last post by:
Please Help!!! I need to capture the following for the current cell of a datagrid on a webpage when I double-click a cell: 1. Field name (ie. "State", which should be the same as the label,...
0
by: Agnes | last post by:
My aim is "select the entire row when the user clicks on a cell in the row AND then catch the double click" I can do it separately .eg I can get the double click on any cell but fail to select the...
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...
2
by: sumuka | last post by:
Hello everyone, How do i achieve left double click in vb 6 . The user has to left double click on the flex grid's cell and the msgbox is to be displayed . So how can i do this. Thanks in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.