TelerikDeveloper.com

TelerikDeveloper.com

AsherB 2/9/2013 4:20:57 PM

Telerik - RadGridView DefaultValuesNeeded event

Many of the articles here on DD are of the 'non-ground-breaking' variety, and... this one is no different.

Often, when coding the Winform RadGridView I need to set default values in the new row. This is a short code example on how to handle that.

You may ask why I would blog something so simple... the answer is that when coding I keep the DD Telerik menu open, and all these code examples add up to faster coding.

 



Private Sub RadGridView1_DefaultValuesNeeded(sender As Object, e As Telerik.WinControls.UI.GridViewRowEventArgs) Handles RadGridView1.DefaultValuesNeeded
    Try
            e.Row.Cells("intSharePercent").Value = 0
    Catch ex As Exception
        GlobalErrorHandler(ex, True)
    End Try
 
End Sub