Tuesday, 27 August 2013

Delphi: Devexpress TCxDbTreeList - Get index of Column

Delphi: Devexpress TCxDbTreeList - Get index of Column

I'm doing a helper for TcxTreeListNode becouse I have a huge program with
a lot of treelists and everytime I have to use the OndrawCustomCell, I'm
asking for a column value to make a confitional formating. The problem is
that the only way I have to do that is asking for the Column index and
that is very confusing. So, I'm trying to make a helper to TcxtreelistNode
so I can have this:
if (AViewInfo.Node.ValuesByName[cxDBTreeList1COLUMN_NAME] = 'bla') then
SOMETHING...
but I can't get to make my helper to get the correct index of the desired
column. I tried copying the method "treelist.ColumnByName(Name)" and
making it returning "I" (suposedly the index) instead of the hole colum,
but that Index is not the same one... Why? Where can i find the correct
Index of the column so I can use it as Value Parameter?
Any Ideas?
I'm working with:
DevExpress 12.1 Delphi XE4

No comments:

Post a Comment