1

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

  • please let me know how did you validated it. I am facing similar issue. – user3942 Jun 30 '11 at 10:37
0

Fixed. I used the function PreSaveAction() to fix this

| improve this answer | |
0

I think you should create a customfield

and overrides the validate method

create custom field control

public override void Validate()
{
   //make your validation here

}
| improve this answer | |
  • Thanks but i did this using Sharepoint Designer. If i did build it in Visual Studio i could have taught of that earlier I need something on the client if it exists. – Patrick Aug 30 '10 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.