Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Disable Child row while Initialize Ultragrid row
posted

Hi team,

I am using VB.Net programming and I want to disable child row as per condition while it initializes.ScreenShot of application

As I attached an image I am able to disable 1st child row where written "12" but not able to disable 2nd row's child row where written "213".

I have written attached code.

Note: Child row name is "FreeText" where I can do inline editing.

Thanks in advance.

Private Sub grdue_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles grdHealthIssue.InitializeRow
e.Row.Cells(ROW_NAME_AvailableList).Activation =   Activation.Disabled
                            IF e.Row.ChildBands(BAND_KEY_FreeText).Rows.Count > 0 Then
                                e.Row.ChildBands(BAND_KEY_FreeText).Rows(0).Activation = Activation.Disabled
                            End IF
End Sub

  • 25105
    Offline posted

    Hello Shubharn,

    Thank you for contacting Infragistics!

    What you will want to do to is check to see if the row is a part of your child band, instead of trying to check to see if the parent row has any child bands, for example

    If (e.Row.Band.Key == “ChildBandName”) {

    }

    Then if you need to check a value on the parent row before disabling the child you can do:

    e.Row.ParentRow

  • 90
    Verified Answer
    Offline posted

    Hi Team,

    I have solved the problem by moving my code from "grdue_InitializeRow" Event to "grdue_InitializeRowCollection" Event.

    Thank you for your support.