One of the variables in my update queries is the current date. I don't know how to set it up ride on the sqldatasource. Using the regular aspx gridview, I normally set this in the code behind.
I'm at a loss on how to do this in radgrid. Here's the code that I've trying to solve. Everything else works but when I do the update, it still cannot find this parameter.
I would appreciate the help. Thank you!
Protected Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
SqlDataSource1.UpdateParameters.Add("@InactiveDate", SqlDbType.DateTime)
SqlDataSource1.UpdateParameters("@InactiveDate").DefaultValue = Date.Now()
End Sub
I'm at a loss on how to do this in radgrid. Here's the code that I've trying to solve. Everything else works but when I do the update, it still cannot find this parameter.
I would appreciate the help. Thank you!
Protected Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
SqlDataSource1.UpdateParameters.Add("@InactiveDate", SqlDbType.DateTime)
SqlDataSource1.UpdateParameters("@InactiveDate").DefaultValue = Date.Now()
End Sub