Ticket Q383100
Visible to All Users

ASPxGridView - How to access controls inside DetailRow on the client side

created 13 years ago

Hello,
obviously I can't find the solution for a simple task.
I want to access the value of a control in a grid's detailrow at clientside.
But something like in Clientgrid's Event DetailRowExpanding:
<clientinstancename>.SetClientVisible(false) or <clientinstancename>.GetText
doesn't seem to work. Maybe because of the missing detailrow's index?
Short question: How can I access the grid's expanded detailrow clientinstancename properties / methods at clientside?
Thank you
Best regards
Juergen

Comments (1)
DevExpress Support Team 13 years ago

    Hi Jürgen,
    Thank you for contacting us. I would like to note that a detail form with nested controls does not exist until a master row is expanded. Thus, you cannot access nested controls that are placed within a collapsed row.
    With expanded rows, a situation is more interesting. When you add a control (e.g., ASPxTextBox) into the detail row and set ClientInstanceName, you expect that you can manipulate the control using its ClientInstanceName. Now imagine the following situation:
    - A user clicks the expand button and changes ASPxTextBox text using ClientInstanceName (suppose txt1);
    - The user expands another row and wishes to change text of ASPxTextBox that is related to this row. However, it has the same ClientInstanceName that ASPxTextBox from the previous step.
    Thus, when a control is placed with a detail row, multiple instances of the control with the same ClientInstanceName are created. As a result, it is impossible to determine which control should be manipulated.
    As a solution, set the unique ClientInstanceName for each control in its Init\Load event handler. I refer you to the following sources that demonstrate a similar solution in action:
    How to bind the detail GridView to data based on the end-user input
    How to refer to a client-side control within a UserControl
    The general technique of using the Init/Load event handler
    Thanks,
    Marion

    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.