Hi all,
I have a problem using MergedCells in RadGridView.
Let's take an example.
Let's say we have this class :
public class TestItem
{
private int _id;
private int _modifierId;
private int _deleteId;
public int Id
{
get { return _id; }
set { _id = value; RaisePropertyChanged("Id"); }
}
public int ModifierId
{
get { return _modifierId; }
set { _modifierId = value; RaisePropertyChanged("ModifierId"); }
}
public int DeleteId
{
get { return _deleteId; }
set { _deleteId = value; RaisePropertyChanged("DeleteId"); }
}
}
And this class to create a collection of TestItems
public
class
TestCollection
: ObservableCollection<TestItem>
{
public
TestCollection(IEnumerable<TestItem> items)
:
base
(items)
{
}
}
With this simple XAML :
<
telerik:RadGridView
ItemsSource
=
"{Binding Collection}"
MergedCellDirection
=
"Vertical"
GroupRenderMode
=
"Flat"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ModifierId}"
DataFormatString
=
"{}{0:N0}"
IsCellMergingEnabled
=
"True"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Id}"
DataFormatString
=
"{}{0:N0}"
IsCellMergingEnabled
=
"True"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding DeleteId}"
DataFormatString
=
"{}{0:N0}"
IsCellMergingEnabled
=
"True"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
How can we create, for ModifierId and for DeleteId, a merged cell with button ?
And when we click on a button we make an action ?