Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,195,603 members, 7,958,843 topics. Date: Thursday, 26 September 2024 at 05:14 AM

Modifying Data - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Modifying Data (952 Views)

__ (2) (3) (4)

(1) (Reply)

Modifying Data by cylife: 10:55pm On May 29, 2016
how can i modify a data?
Re: Modifying Data by speedj: 11:04pm On May 29, 2016
cylife:
how can i modify a data?


i use "dapfor.Net Grid" When data is modified, the programmer has to inform the grid about it using Row.Update() method. When event-driven model is used, the grid can receive and process notifications from INotifyPropertyChanged or IBindingList interfaces. In such scenario, when the grid receives notification and performs multi-threading synchronization (if needed), the grid automatically calls Row.Update() method for a corresponding row.
class Employee : INotifyPropertyChanged
{
private readonly string _name;
private string _department;
private readonly string _position;

public Employee(string name, string department, string position)
{
_name = name;
_department = department;
_position = position;
}

public string Name
{
get { return _name; }
}

public string Department
{
get { return _department; }
set
{
if(_department != value)
{
_department = value;
if(PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Department"wink);
}
}
}
}

public string Position
{
get { return _position; }
}

public event PropertyChangedEventHandler PropertyChanged;

(1) (Reply)

Successful People Put Into There Business To Become Successful / To All Developers / Using SAP Business One For Production

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.