Hi, I need to represent hierarchical data in my XamGrid in a particular format, where expandable rows have a "+/-" next to them. To accomplish this, I overrode the TextColumn class and its TextColumnContentProvider to add in the +/- behavior. It works, but when the window is grown, for some reason the cells that were not visible before don't display their data. What can I do to fix this?
I tried to attach a sample solution illustrating the problem, but the forum kept giving me "500 Server Error" errors (I guess you guys are having problems with the new site). I don't have access to filesharing websites on this PC, but if you email me then I can reply with the solution.
Thanks!
HI,
I was able to prevent the nullrefrence execption with the following code snippet:
void expandBlock_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { var r = (Row)_cell.Row; r.IsExpanded = !r.IsExpanded; ExpandColumnClickEventArgs _clickeventargs = new ExpandColumnClickEventArgs(_cell.Row.Index, _cell.Row.Data); if (_column != null) { _column.OnClick(_clickeventargs); } else { _column = _cell.Column as ExpandColumn; _column.OnClick(_clickeventargs); } }
void expandBlock_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var r = (Row)_cell.Row;
r.IsExpanded = !r.IsExpanded;
ExpandColumnClickEventArgs _clickeventargs = new ExpandColumnClickEventArgs(_cell.Row.Index, _cell.Row.Data);
if (_column != null)
_column.OnClick(_clickeventargs); }
else
{ _column = _cell.Column as ExpandColumn;
_column.OnClick(_clickeventargs);
} }
Here is a forum post on creating Custom Columns: http://ko.infragistics.com/community/blogs/devin_rader/archive/2010/07/08/creating-custom-columns-for-xamgrid.aspx
Sincerely, Matt Developer Support Engineer
I am reviewing your issue and have replicated it.
I am working on a resolution.