|
public Form1()
{
InitializeComponent();
sfDataGrid.DataSource = data.OrdersListDetails;
(sfDataGrid.View as CollectionViewAdv).CollectionChanged += CollectionChanged;
}
void CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
// Do your needed customization here.
}
} |
Hi Eren,Thanks for contacting Syncfusion support.When you are adding a new row using AddNewRow, you can able to listen the adding operation by using CollectionChanged event in SfDataGrid.View.Please refer the below code example and sample from the given location.Code Example
public Form1(){InitializeComponent();sfDataGrid.DataSource = data.OrdersListDetails;(sfDataGrid.View as CollectionViewAdv).CollectionChanged += CollectionChanged;}void CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e){if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add){// Do your needed customization here.}}Sample Location - http://www.syncfusion.com/downloads/support/directtrac/general/ze/CollectionChanged_Sample1451514286Regards,Mohanram A.
Not SfDatagrid event or MdiParent event.I am trying to when Press F5 key datagrid's datasource updated or press DELETE selected row deleted
UserControl KeyPress Or Down Event not fired
And i can't set text (title) property of form
Here
public partial class CurrentList : frmList
{
public CurrentList(string _title, DataTable dtSource)
{
InitializeComponent();
this.Text = _title;
sfDataGrid2.DataSource = dtSource;
}
}
thank you i solved the problem before