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
330
Move add row to bottom of grid at runtime?
posted

I am trying to give the user the runtime option to select whether new records are added at the top or bottom of the grid. I can't find any example code, but it looks like it can be done. Can anyone help me with this code to toggle between add row at the top and add row at the bottom? This currently doesn't do anything:

    Private Sub chkAddBottom_CheckedChanged(sender As Object, e As EventArgs) Handles chkAddBottom.CheckedChanged
        If chkAddBottom.CheckState = CheckState.Checked Then
            grdGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom
            grdGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnBottom
        Else
            grdGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnTop
            grdGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnTop
        End If
    End Sub

Parents Reply Children
No Data