Change datagridview row number from 0 to 1

dave_sky
dave_sky used Ask the Experts™
on
Software vb.net & sql server 2005

I am looking for sample code to change datagridview row number to 1 if 0 in the useraddedrow event

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Pro/Developer
Top Expert 2008
Commented:

Author

Commented:
That example will not work
Jorge PaulinoIT Pro/Developer
Top Expert 2008

Commented:
why?

Author

Commented:
This is what I tried...

Private Sub TblBasicUpgradesDetailDataGridView_DefaultValuesNeeded(ByVal sender As Object, _
        ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) _
        Handles TblBasicUpgradesDetailDataGridView.DefaultValuesNeeded

        With e.Row
            .Cells("sysAppOrder").Value = "1"
           
        End With

    End Sub

Author

Commented:
Thanks! It worked after all...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial