How can i have a server side double click event?
I'm trying to migrate an application from utragrid to the new hierarchical grid.
i'm no asp.net specialist.... :(
Can anyone help me?
Guy
Hi Guy,
Thank you for posting in the community.
Note that in WebDataGrid/WHDG the click and doubleClick events are only available on the client. If you provide me with more specific information regarding your requirement I would be happy to recommend an event to handle which would be suitable for your scenario.
Please feel free to contact me if you have any questions.
in the old style ultragrid we used the following code:
Private Sub UltraWebGrid_DblClick(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.ClickEventArgs) Handles
UltraWebGrid.DblClick
Dim myMaster As
main
myMaster =
CType(Me.Master, main
)
Dim basketItem As
BasketItem
Dim product As
Product
Dim resultTable As
DataTable
Dim activeRow As Infragistics.WebUI.UltraWebGrid.UltraGridRow
= UltraWebGrid.DisplayLayout.ActiveRow
If CType(Session.Item("userLoggedIn"), User).IsAdministrator
Then
If Not activeRow Is Nothing AndAlso Not e.Row Is Nothing
resultTable =
DataAccess
.GetProduct(activeRow.Cells(V_ITEM_ID).Value)
If Not resultTable Is Nothing AndAlso resultTable.Rows.Count > 0
product =
New Product
() product.ProductID = resultTable.Rows(0).Item(
product.ProductID = resultTable.Rows(0).Item(
"ID_PRODUCT"
) product.Name = resultTable.Rows(0).Item(
product.Name = resultTable.Rows(0).Item(
"NAME"
) product.Description = resultTable.Rows(0).Item(
product.Description = resultTable.Rows(0).Item(
"DESCRIPTION"
) product.Price = resultTable.Rows(0).Item(
product.Price = resultTable.Rows(0).Item(
"PRICE"
) product.SupplierID = resultTable.Rows(0).Item(
product.SupplierID = resultTable.Rows(0).Item(
"ID_SUPPLIER"
) product.CategorieID = resultTable.Rows(0).Item(
product.CategorieID = resultTable.Rows(0).Item(
"ID_CATEGORY"
If Not resultTable.Rows(0).Item("URL_PHOTO") Is DBNull.Value
product.UrlPhoto = resultTable.Rows(0).Item(
"URL_PHOTO"
Else
product.UrlPhoto =
Nothing
End
If
Session.Item(
"OrderItemID"
) = activeRow.Cells(V_ITEM_ID).Value basketItem =
basketItem =
New BasketItem
(product, activeRow.Cells(V_COUNT).Value, activeRow.Cells(V_EXTRA_ID).Value, _ 0, activeRow.Cells(V_REMARK).Value, activeRow.Cells(V_BON).Value, activeRow.Cells(V_EXTRA).Value) Session.Item(
0, activeRow.Cells(V_REMARK).Value, activeRow.Cells(V_BON).Value, activeRow.Cells(V_EXTRA).Value)
"basketItem"
) = basketItem Session.Item(
"status") = ObjectManager.state
.ADMIN_EDIT myMaster.Response.Redirect(PAGE_PRODUCT)
myMaster.Response.Redirect(PAGE_PRODUCT)
Sub
but now i don't have the double click event any more...
so how can i proceed?
Hi on4bhm,
Apologies for the delayed response.
I am attaching a sample illustrating how the form may be submitted on the DblClick clientside of the grid. On the resulting postback, a label on the page is update with the index of the double clicked row (through the selection behavior). This approach should be applicable for the implementation of the required double click functionality.
Feel free to contact me if you have any questions.
Please do not hesitate to contact me if you need more information regarding this matter.