I have an UltraGrid on a form. In designer mode, I am using the UltraGrid Designer to go in and set most of the columns to hidden. In the designer I am getting what I expect:
Then when I run the app, I am getting ALL the columns:
Any thoughts on why? For the record, the collection being displayed is in a hierarchical set of custom business objects where all the collections DO implement a custom ITypedList interface (See this post for clarification). I am wondering if the custom ITypedList might have something to do with it.
Sam
My first suspicion would be that somewhere in your code (possibly in the InitializeLayout event handler), you are setting the column's Hidden property to false. The easiest way to confirm this is to search the source for the phrase ".Hidden = ".
No luck there :( But I am a BIG fan of writing code via GUI's rather then editors. I did use a test program that is using the custom ITypedList interface and that is hiding the columns correctly. Here is all the code I have written for the control:
public sealed partial class QuestionBoxDetailControl : UserControl, IDetailPanel
{
public static UserControl Create(TmplBldrDoc tmplBldrDoc)
QuestionBoxDetailControl control = new QuestionBoxDetailControl();
control._tmplBldrDoc = tmplBldrDoc;
control.aTQuestionBoxBindingSrc.DataSource = tmplBldrDoc.DetailItem;
return control;
}
private TmplBldrDoc _tmplBldrDoc;
public QuestionBoxDetailControl()
InitializeComponent();
public void Initialize(TmplBldrDoc tmplBldrDoc)
_tmplBldrDoc = tmplBldrDoc;
#region IDetailPanel Members
public string Title
get { return "Question Detail"; }
void IDetailPanel.UpdateData(TmplBldrDoc tmplBldrDoc, IDetailPanel newPanel)
Debug.Assert(newPanel.GetType().Equals(this.GetType()));
#endregion