I have a rad grid that i'm doing a custom inline edit on, and when I press the save button, i'm trying to do a client side validation of some of the fields. But the OnClientClick event seems to be completely blocking the post back. Any ideas?
| protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item is GridEditFormItem && e.Item.IsInEditMode) |
| { |
| Button bs = editFormItem.FindControl("btnSave") as Button; |
| bs.OnClientClick = "return validateChanges('" + m_Value+ "');"; |
| } |
| } |
and the javascript function right now I just have
function validateChanges(val)
{
return true;
}
but it never posts. Any ideas?
my asp button is this:
<asp:Button ID="btnSave" CssClass="buttonSmall" runat="server" Text="Save" CommandName="Update"/>
always works till i put in the OnClientClick property