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?
 
snehanshuConnect With a Mentor Commented:
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
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
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
All Courses

From novice to tech pro — start learning today.