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
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 KokkalagaddaAssociate Software Developer, Windows Formshttp://ko.infragistics.com/
Thanks v much for your reply.
That was a typo, sorry - error message refers to LastUpdateDT.
So yes, you say the column count WILL be 0 of I don't bind the grid with any data.
Is this true then? Its just, at design time, the columns are there.
What I wanted to do is add a filter to one column only before data: bascially at runtime. And it's a date field.
Is this do-able? Is suspect it isn't. Thank you.