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.

grid row selection

Thread ID:

Created:

Updated:

Platform:

Replies:

46861 Jul 21,2006 05:58 PM Mar 11,2008 12:36 AM ASP.NET Web Forms (Classic) 4
loading
Tags: GridGroupingControl
Sandy
Asked On July 21, 2006 05:58 PM

I would like to extract the data from certain columns in a row of data when it is selected. The thing I don''t know is what syntax to use. What event is triggered when a row is selected and what arguments item do I use?

Thanks,
Sandy

Administrator [Syncfusion]
Replied On July 21, 2006 09:58 PM

Hi Sandy,

To do this, You should handle the ''SelectedRecordsChanged'' event and also set the ''PostBackOnFocusedChanged'' property to ''True''. This property ''PostBackOnFocusedChanged'' makes the grid to trigger a postback whenever a selection is changed and the event ''SelectedRecordsChanged'' triggers whenever the selection is made and the grid gets posted back.

To Get the value of any of the fields in the selected row try something similar to the code below inside the ''SelectedRecordsChanged'' event.

[c#]
if(e.SelectedRecord!=null)
{
e.SelectedRecord.Record.GetValue("ColumnName");
}

[vb]
If (Not e.SelectedRecord Is Nothing) Then
e.SelectedRecord.Record.GetValue("ColumnName")
End If

Hope this helps.

Thanks,
A.Sivakumar

Administrator [Syncfusion]
Replied On July 22, 2006 10:00 AM

That worked great. I had tried the SelectedRowChanged event previously but was missing the PostBackOnFocusChanged = true part.
Thanks Again!
Sandy

Mike at MK
Replied On March 7, 2008 04:04 PM

I tried this too and it did work, but the only problem I am having, the row selection is executing every time my page does any postback. In otherwords, if I click another control, it forces a postback and the grid selects a row on its own causing it to execute code I don't want run until I actually click on a row.

>I would like to extract the data from certain columns in a row of data when it is selected. The thing I don't know is what syntax to use. What event is triggered when a row is selected and what arguments item do I use?

Thanks,
Sandy


Administrator [Syncfusion]
Replied On March 11, 2008 12:36 AM

Hi Sandy,

Thank you for your Patience.

Issue : the row selection is executing every time my page does any postback

The issue mentioned here is suspected to be a defect and we have sent this to our development team for more analysis. We will update you once we get back from our development team.

Please let me know if you have any other concerns.

Regards,
Vishnu.



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.

;