OT: Displaying the Formatted SmartDate in a cell in the gridOT: Displaying the Formatted SmartDate in a cell in the grid
Old forum URL: forums.lhotka.net/forums/t/832.aspx
ward0093 posted on Monday, August 07, 2006
This might be a little off topic...
I have a grid showing all my Open Invoices... just wondering if anyone knows how to show (or bind) the TEXT property of the SmartDate object in that column of the grid?...
ward0093
Brian Criswell replied on Monday, August 07, 2006
Expose the property as a string instead of a SmartDate
public string TheDate
{
get
{
this.CanReadProperty("TheDate", true);
return _theDate.Text;
}
set
{
this.CanWriteProperty("TheDate", true);
if (value == null) value = string.Empty;
if (_theDate.Text != value)
{
_theDate.Text = value;
this.PropertyHasChanged("TheDate");
}
}
}
This allows the object to know when the value has changed. It also makes data binding really easy.
ward0093 replied on Monday, August 07, 2006
great!... that is what I thought...
thanks,
ward0093
Copyright (c) Marimer LLC