I have a data view web part and it does insert,delete ,in edit mode it save and cancel button.The data is based on a custom list.In the list i have set the max to 4 but in DWP it doesn't seem to work. When in Edit mode or in Insert mode i want to validate this field
<SharePoint:formfield runat="server" id="ff9{$Pos}" ControlMode="Edit" FieldName="Quantity" ItemId="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff9',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Quantity')}" />
I want make sure the number being added is not greater that 4. Any ideas? Thanks