Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Columns exist at Design time, but not at Run time?
posted

C#  ultrawingrid v12.2

I have a grid, and at design time it has column headers.


I want to add a column filter on one column only.

After initialize_component, before binding any data at all, I have ...

instructionsGrid.DisplayLayout.Bands[0].Columns["LastUpdateDT"].AllowRowFiltering = DefaultableBoolean.True;

However, it comes back with the message Key not found: 'LastUpdateDate'. Parameter name: key     ... basically, column count is 0.

Is there a reason why is column count is 0 when they exist at design time?

Thanks

Parents
  • 6120
    Verified Answer
    Offline posted

    Hi Carlos,

    Looking at the code you had in your email, I noticed two things.

    1. The column key that you used to set RowFiltering is “LastUpdateDT” while the error message says “LastUpdateDate” key not found. Are you using a different key?
    2. You said after intitalize_component and before binding any data the column count is 0. The column count will be 0 if you dint bind your grid with any data.

    I suggest you to verify these two things first, and if I’m missing any details here can you please send them to me.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer, Windows Forms
    http://ko.infragistics.com/

Reply Children