How to find the actual class of DevExpress Quantum Grid 4.5.1 cxEditors? Inheritance Problems.

Hi, Buddies,

Anyony use DevExpress QG? I am very confused about the inheritance of cxEditors.

Now I have several cxEditors on my form, including cxTextEdit, cxComboEdit
etc, I want to find out what kind of editor the ActiveControl on my form is at
run-time.

I used (ActiveControl is TcxTextEdit) and (ActiveControl is TcxComboEdit),
but it was always "False".

I find all the class name of these controls are "TcxCustomInnerTextEdit" by
using ActiveControl.ClassName, and anyone could plz tell me how to find out
which is which?

Thanks a lot,

Edward Wang
wyuanzhengAsked:
Who is Participating?
 
snehanshuCommented:
wyuanzheng,

You can use the parent property of the activecontrol (TcxCustomInnerTextEdit) to determine whether it is TcxTextEdit or somethin else.
e.g.


procedure TForm1.FormClick(Sender: TObject);
begin
  If (ActiveControl is TcxCustomInnerTextEdit) then
  Begin
    If (TcxCustomInnerTextEdit(ActiveControl).Parent is TcxTextEdit) OR
      (TcxCustomInnerTextEdit(ActiveControl).Parent is TcxComboBox) Then
      ShowMessage(TcxCustomInnerTextEdit(ActiveControl).Parent.Name);

  End;
end;


HTH,
...Shu
0
 
kretzschmarCommented:
well,

doesn't have devexpress-quantumgrid on hand yet,
but if i remember correct, then there is a property InplaceEditor
on the column, where could be decided which class of InplaceEditor
is used.

but this is just a guess, not sure

meikl ;-)
0
 
wyuanzhengAuthor Commented:
Yes, there is absolutely a property named InplaceEditor on a column in the Grid; while, I want to know is not the column, but the editor controls on the form.

Edward
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
auke_tCommented:
Why don't you just post your question on the DevExpress forum, they're well known for their excellent and fast support!

Good luck
0
 
snehanshuCommented:
I feel that my comment could have helped.
Cheers!
...Shu
0
 
snehanshuCommented:
??
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.