I watched the video training about putting some asp.net validator's in an UltraWebGrid and my question is that i can't find a way how to make them work when i use RowEditTemplate to insert/update data in the grid.
Yep, that is a great idea too, CustomValidators may be needed for more complex validation rules. The EnableClientSCript property may also be used to customize the server-side / client-side functionality.
Thanks for sharing this idea with the community - certainly will be appreciated by other people as well.
Do not forget that you can use also CusomValidators control.CustomValidators have two validate methods:
OnClient method runs first.With OnClient validate event u can take the control that you want using document.getElementById() if its a normal html control.If it runat="server" use document.getElementById("<%= controlId.ClientID %>") or document.getElementById("<%= controlId.UniqueID%>").This is because it's inside the grid and the control when reders probably with take a client id such as "WebGrid_RowEditTemplate_controlId"
Hello,
There is no standalone textarea control in the ASP.NET framework - but you can use TextBox for that - just make sure you set TextMode to MultiLine, e.g.
<asp:TextBox TextMode="MultiLine" Columns="40" Rows="40" />
Using RangeValidator is possible, but it really depends on the types of values entered in the textbox and could be tricky to achieve. I suggest going through the following MSDN article for details:
http://msdn.microsoft.com/en-us/library/f70d09xt(VS.71).aspx
Can you only do this with text inputs? How about textarea?
Can you only validate using RequiredFieldValidator? I can't seem to get RangeValidator to work.
thank you very much. it works!