The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
ADAdministrator Syncfusion Team July 22, 2006 01:58 AM UTC
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.
[vb] If (Not e.SelectedRecord Is Nothing) Then e.SelectedRecord.Record.GetValue("ColumnName") End If
Hope this helps.
Thanks, A.Sivakumar
ADAdministrator Syncfusion Team July 22, 2006 02:00 PM UTC
That worked great. I had tried the SelectedRowChanged event previously but was missing the PostBackOnFocusChanged = true part. Thanks Again! Sandy
MAMike at MKMarch 7, 2008 09:04 PM UTC
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
ADAdministrator Syncfusion Team March 11, 2008 04:36 AM UTC
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.