i have a sample code which has a observable collection of items. if i enter qty/rate , total field should display qty * rate. but i can't get it. item collection is updated but not shown in the gridview. give suggestion to show the updated total field in radgridview when qty/rate changes. here is the code
namespace RadGridViewWPF
{
/// <
summary
>
/// Interaction logic for MainWindow.xaml
/// </
summary
>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ObservableCollection<
Item
> items = new ObservableCollection<
Item
>();
for (int i = 0; i < 10; i++)
{
items.Add(new Item() { ID = 1, ItemName = "Item" + i, Qty = 1, Rate = 12});
}
this.RadGridView1.ItemsSource = items;
}
}
public class Item
{
private int _ID;
public int ID
{
get { return _ID; }
set { _ID = value; }
}
private string _ItemName;
public string ItemName
{
get { return _ItemName; }
set { _ItemName = value; }
}
private decimal _Rate;
public decimal Rate
{
get { return _Rate; }
set { _Rate = value; }
}
private int _Qty;
public int Qty
{
get { return _Qty; }
set { _Qty = value; }
}
private decimal _Total;
public decimal Total
{
get { return _Qty * _Rate; }
set { _Total = value; }
}
}
}