Hello guys,
I am gonna insert some controls into AddNewBox, like some buttons or images. I tried to use CreationFilter to achieve this.However, I can never see controls I added.
In my CreationFilter:
...
public void AfterCreateChildElements(Infragistics.Win.UIElement parent)
{
ButtonUIElement btn1 = (ButtonUIElement)parent.GetDescendant(typeof(ButtonUIElement));
}
parent.ChildElements.Add(btn1);
in my form:
grid.DisplayLayout.AddNewBox.Hidden = false;
grid.DataSource = lsResult;
AddNewCreationFilter addNew = new AddNewCreationFilter();
grid.CreationFilter = addNew;
When I debug I can see the buttonUIElement control is added, but it never appears on the UI.
Any idea on this?
Cheers,
Elton
Hi Elton,
It's hard to say for sure with just a code snippet, but one thing I notice is that you are not setting the Rect on the button element. So my guess is that is has a size of 0,0.
Thank you for the reply Mike,
I am actually looking for a way to insert a new "row" like part into the bottom of each levevl/group of grid, and put my own controls onto that part.
I was trying to use AddNewBox but I notice it's only available in level 1. Coz the AddNewRow appears on each level, so I am trying that for now.
I also think the FilterRow could be another option.
Just wonder which way you think is easy to archieve this.
Need your advice.