We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

retrieving values of selected row

Thread ID:

Created:

Updated:

Platform:

Replies:

44104 May 13,2006 03:40 AM May 15,2006 06:20 AM Windows Forms 3
loading
Tags: GridControl
cheryl
Asked On May 13, 2006 03:40 AM

hello all on gdbg_DoubleClick event how do i capture the values of the selected row ? please send solution in vb.net Thanx

Administrator [Syncfusion]
Replied On May 13, 2006 05:09 AM

Hi Cheryl, To catch the double click event in a grid cell ,You need to handle the CurrentCellControlDoubleClick. Please try this code snippet for getting the data in a selected row. Here is a code snippt. Private Sub gridDataBoundGrid1_CurrentCellControlDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles gridDataBoundGrid1.CurrentCellControlDoubleClick Console.WriteLine("Selected Records") For Each info As GridRangeInfo In Me.gridDataBoundGrid1.Model.SelectedRanges If info.IsRows Then Dim i As Integer = 1 Do While i <= Me.gridDataBoundGrid1.Model.ColCount Console.Write("--" & Me.gridDataBoundGrid1.Model(info.Top, i).Text & "--") i += 1 Loop End If Console.WriteLine() Next info End Sub Here is a sample. http://www.syncfusion.com/Support/user/uploads/SelectDataVB_4d49c2a4.zip Please let me know if this helps. Best Regards, Haneef

cheryl
Replied On May 15, 2006 05:06 AM

hello haneef, This gets the values for each cell in the row . my requirement is , when i double click on a ceratin row the reocrd should be available to the next tab page....... i am not able to manage the same through currency manager..... and also on which EVENT would the code(in vb. net) be in ??? Thanx >Hi Cheryl, > >To catch the double click event in a grid cell ,You need to handle the CurrentCellControlDoubleClick. Please try this code snippet for getting the data in a selected row. Here is a code snippt. > >Private Sub gridDataBoundGrid1_CurrentCellControlDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles gridDataBoundGrid1.CurrentCellControlDoubleClick > Console.WriteLine("Selected Records") > For Each info As GridRangeInfo In Me.gridDataBoundGrid1.Model.SelectedRanges > If info.IsRows Then > Dim i As Integer = 1 > Do While i <= Me.gridDataBoundGrid1.Model.ColCount > Console.Write("--" & Me.gridDataBoundGrid1.Model(info.Top, i).Text & "--") > i += 1 > Loop > End If > Console.WriteLine() > Next info >End Sub > >Here is a sample. >http://www.syncfusion.com/Support/user/uploads/SelectDataVB_4d49c2a4.zip > >Please let me know if this helps. >Best Regards, >Haneef >

Administrator [Syncfusion]
Replied On May 15, 2006 06:20 AM

Hi Cheryl, Could you try this code to get the selected records in a grid.Here is a code snippet. Private Sub gridDataBoundGrid1_CurrentCellControlDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles gridDataBoundGrid1.CurrentCellControlDoubleClick Console.WriteLine("Selected Records") For Each info As GridRangeInfo In Me.gridDataBoundGrid1.Model.SelectedRanges Dim table As DataTable = Me.gridDataBoundGrid1.DataSource Dim drow As DataRow = table.Rows.Item(Me.gridDataBoundGrid1.Binder.RowIndexToListManagerPosition(info.Top)) For j As Integer = 0 To drow.ItemArray.Length - 1 Console.Write(drow.Item(j) & " ") Next j Console.WriteLine() Next info End Sub Let us know if you are trying something different. Thanks for your interest in Syncfusion products. Best Regards, Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;