in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Disallow expansion of master row if child view's is empty

Last post 8/31/2008 11:48 PM by Anthony Cheung. 3 replies.
Page 1 of 1 (4 items)
Sort Posts:
Previous Next
  • 8/29/2008 6:07 AM

    Disallow expansion of master row if child view's is empty

    I would like to prevent a master row from being expanded if there are no data rows in the child view.

    Applying a filter that filters out all rows is equivalent to no data.

    Therefore, OptionsDetail.AllowExpandEmptyDetails=false will not work in my case.

  • 8/29/2008 5:55 PM In reply to

    Re: Disallow expansion of master row if child view's is empty

    You might test for the existence of child data within a handler method for the GridView.MasterRowExpanding Event.  Set the Allow property of the MasterRowCanExpandEventArgs parameter accordingly.
     
    Not sure how you would test for the existence of specific child data, though, when a filter is applied.  Might have to parse the filter expression, somehow, and combine it with a check on the value in the column that is related to the master row being expanded.
     
    Sorry I can't help further.  Hope these ideas help.
     
  • 8/31/2008 11:09 PM In reply to

    Re: Disallow expansion of master row if child view's is empty

    I want to check

    gridview.IsMasterRowEmpty(), but this requires the correct defaultrelationindex to be set.

    How do i know the relation indexes at design time?

  • 8/31/2008 11:48 PM In reply to

    Re: Disallow expansion of master row if child view's is empty

    Oh, the details are not created until it has expanded. Indifferent

Page 1 of 1 (4 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED