₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,347 members, 8,430,541 topics. Date: Saturday, 20 June 2026 at 04:46 PM

Toggle theme

Speedj's Posts

Nairaland ForumSpeedj's ProfileSpeedj's Posts

1 (of 1 pages)

ProgrammingRe: Add A Dictionary To A Grid by speedj: 9:29pm On Jun 04, 2016
cylife:
how can i add a dictionary to a grid?
this is simply done by the use of dapfor.Net Grid. check the code below

//Add a dictionary to a grid
IDictionary<string, object> dataObject1 = new Dictionary<string, object>();
dataObject1.Add("IntValue", 10);
dataObject1.Add("StringValue", "some string 1"wink;
grid.Rows.Add(dataObject1);
ProgrammingRe: 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;
ProgrammingRe: Object Of Arbitrary Classes by speedj: 11:40pm On May 25, 2016
cylife:
how can i know the object of arbitrary classes?
with the help of dapfor.netgrid. A programmer may create any arbitrary classes in application. Objects of these classes are associated with grid rows, and their properties are associated with grid columns. Values returned by getters of these properties are displayed in grid cells.check the codes below
public class MyCustomClass
{
private int _intValue;
private double _doubleValue;
private string _stringValue;

public MyCustomClass(int intValue, double doubleValue, string stringValue)
{
_intValue = intValue;
_doubleValue = doubleValue;
_stringValue = stringValue;
}

public int IntValue
{
get { return _intValue; }
set { _intValue = value; }
}

public double DoubleValue
{
get { return _doubleValue; }
set { _doubleValue = value; }
}

public string StringValue
{
get { return _stringValue; }
set { _stringValue = value; }
}
}




title public class MyCustomClass
{
private int _intValue;
private double _doubleValue;
private string _stringValue;

public MyCustomClass(int intValue, double doubleValue, string stringValue)
{
_intValue = intValue;
_doubleValue = doubleValue;
_stringValue = stringValue;
}

public int IntValue
{
get { return _intValue; }
set { _intValue = value; }
}

public double DoubleValue
{
get { return _doubleValue; }
set { _doubleValue = value; }
}

public string StringValue
{
get { return _stringValue; }
set { _stringValue = value; }
}
}

1 (of 1 pages)