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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get value of a column in a selected row in GDBG

Thread ID:





6792 Aug 28,2003 05:57 AM UTC Aug 28,2003 07:27 AM UTC WinForms 1
Tags: GridControl
Oliver Nagel
Asked On August 28, 2003 05:57 AM UTC

hi! I've got the following problem: I made a GDBG. It's datasource is me.dataset1.table1. When a user doubleclicks a row i want to get the value of me.dataset1.table1(Clickedrow).Column5. this works up to now. but when the GDBG is sorted by a column, then the above example returns the wrong value because it references a wrong row in the datasource.

Administrator [Syncfusion]
Replied On August 28, 2003 07:27 AM UTC

You can get the currently selected row in your DataTable through the CurrencyManager even if the table is filtered and/or sorted. If HiddenCol is the name of a column in your datatable, you can get at the value of this column in the current row through code like: Dim cm As CurrencyManager = Me.BindingContext(Me.GridDataBoundGrid1.DataSource, Me.GridDataBoundGrid1.DataMember) Dim dr As DataRow = CType(cm.Current, DataRowView).Row Me.Label1.Text = dr("HiddenCol").ToString()


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon