Ticket DQ15369
Visible to All Users

How to detect focused datacell (index etc.) in MultiEditorRow

created 19 years ago

I use MultiEditor to edit some certain order data. I want to detect which datacell focused at runtime in editor event…
I use events for initialize popup list. So I declare OnInitPopup at runtime for all datacells.
like this…
with MultiEditorRow.Properties.Editors.Add do begin
   TcxMRUEditProperties(EditProperties).OnInitPopup := OnMRUInitPopup;
end;
… Now, I have to find out which datacell editing in OnMRUInitPopup
procedure TForm.OnMRUInitPopup(Sender: TObject);
begin
  DataId := cxVerticalGrid1.FocusedRow.Tag; //This gives me MultiEditor Row's Tag…
  // How can I know which datacell focused now ???

end;
I try to use Row.Tag to assign data, but, multieditor.editors has no Tag property. Furhermore, I could not find a pointer from Sender (TcxEditor) in OnMRUInitPopup(Sender: TObject) to reach which datacell?
I hope I could tell my trouble…
Thanks…

Comments (1)
DevExpress Support Team 19 years ago

    Hi,
    You can obtain the required information via the VGController's CellIndex property. However, the Controller property is declared as protected in the TcxCustomVerticalGrid class. Please use the approach described in the "How to access a protected class member" knowledgebase article (www.devexpress.com/kbA1030) to access it. Here is some sample code demonstrating this technique in action
    type
      TcxVerticalGridAccess = class(TcxVerticalGrid);
    var
      ACellIndex: Integer;
    begin
      …
      ACellIndex := TcxVerticalGridAccess(cxDBVerticalGrid1).Controller.CellIndex;
      …
    Please try this solution and let us know if it helps.
    Thanks,
    Vito

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.