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.

How to get value of particular column when entire row is selected

Thread ID:

Created:

Updated:

Platform:

Replies:

118409 Mar 5,2015 10:37 AM Mar 9,2015 03:07 PM Windows Forms 6
loading
Tags: GridGroupingControl
Rem Aza
Asked On March 5, 2015 10:37 AM

The Gridgroupingcontrol is bound to a dataset from a table "Books" that had three columns Title , Author,  Genre.

Entire row gets selected when clicked ( ListBoxSelectionMode = SelectionMode.One; )

How do I get the Title value of a selected row 

Sérgio Rodrigues Costa
Replied On March 6, 2015 07:41 AM

I'm going through the same experience. I would like to loop through the whole Gridgroupingcontrol obtaining certain fields . The Gridgroupingcontrol is connected to a list. I am using Entity Framework to return the data list. Can anyone help?

Sérgio Rodrigues Costa
Replied On March 6, 2015 01:30 PM

Well, I´m sorry.
I mean on GridGroupingControl.

Solai A L [Syncfusion]
Replied On March 6, 2015 04:28 PM

Hi Rem/Sergio,

Thank you for your interest in Syncfusion Products.

In order to get the particular value of a record in column wise, you can use GetValue() of record class(by passing the column name) in TableModel_SelectedRecordsChanged event. Please refer the below code snippet for further clarification.

 

Code Snippet[C#]:

foreach (GridRangeInfo range in gridGroupingControl1.TableModel.SelectedRanges)

            {

                if (range.IsRows)

                {

                    for (int i = range.Top; i <= range.Bottom; i++)

                    {

                        Record rec = gridGroupingControl1.Table.DisplayElements[i].GetRecord();

                        string colvalue = rec.GetValue("column name").ToString();

                    }

                }

            }

Please let us know if you have any other concerns.

Thanks & Regards,

AL.Solai.


Sérgio Rodrigues Costa
Replied On March 8, 2015 08:19 AM

Thank you. Works great.
Best regards.



Rem Aza
Replied On March 8, 2015 11:45 PM

Thank you . 

Neelakandan Kannan [Syncfusion]
Replied On March 9, 2015 03:07 PM

Hi Rem/Sergio,

Thank you for your update.

We are glad to hear from you that your scenario is resolved.

Please let us know if you need further assistance on this. We will assist you as early as possible.

Regards,

Neelakandan



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.

;