This question is locked. New answers and comments are not allowed.
In the selection_changed event handler I want to be able to determine if the checkbox in the selected row has been selected.
I don't seem to be able to do this? Please advise
e.g.
private void RadGridView1_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
var dataItem = e.AddedItems[0];
bool checkBoxValue;
if (dataItem != null)
{
var selectedUIRow = RadGridView1.ItemContainerGenerator.ContainerFromItem(dataItem)
as Telerik.Windows.Controls.GridView.GridViewRow;
if (selectedUIRow != null)
{
var firstCell = selectedUIRow.Cells[3] as Telerik.Windows.Controls.GridView.GridViewCell;
if (firstCell != null)
{
// Get the value from the UI without knowing the type.
//checkBoxValue = (bool)firstCell.Value;
}
}
}
}
firstcell.value returns the whole data entity... which is not what I want
I don't seem to be able to do this? Please advise
e.g.
private void RadGridView1_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
var dataItem = e.AddedItems[0];
bool checkBoxValue;
if (dataItem != null)
{
var selectedUIRow = RadGridView1.ItemContainerGenerator.ContainerFromItem(dataItem)
as Telerik.Windows.Controls.GridView.GridViewRow;
if (selectedUIRow != null)
{
var firstCell = selectedUIRow.Cells[3] as Telerik.Windows.Controls.GridView.GridViewCell;
if (firstCell != null)
{
// Get the value from the UI without knowing the type.
//checkBoxValue = (bool)firstCell.Value;
}
}
}
}
firstcell.value returns the whole data entity... which is not what I want