void sfListView1_DoubleClick(object sender, EventArgs e)
{
//Texto da seleção
string Seleção = (sfListView1.SelectedItems[0] as USState).LongName.ToString();
MessageBox.Show(Seleção);
} |
hi
I set (Datatable) as a datasource for SfListView how to get the selected value for the selected item??
Hi Mohamad
We have created a sample based on your requirement. Please refer to the sample for your reference.
Code Snippet:
private void SfListView1_SelectionChanged(object sender, Syncfusion.WinForms.ListView.Events.ItemSelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
{
// Get the selected item's value
DataRowView selectedRow = (DataRowView)sfListView1.SelectedItem;
object selectedValue = (object)selectedRow["Name"];
MessageBox.Show("Selected item's value: " + selectedValue);
}
}
Regards,
Raghavendra S