Rank: Advanced Member Groups: Member
Joined: 12/5/2007 Posts: 57
|
Hi,
I want to be able to use the built in ability of the grid to append items as required. The problem I am having is that I have 1 or more columns that must be filled in order to be valid. I noticed with my implementation as well as your sample that you can creat new blank rows in the grid regardless of wether the row being edited contains any data in any of the cells.
I tried to resolve this by using masked edit columns for my mandatory columns containing a masked edit and a MaskedEditSegment as shown below but it still doesn't prevent it. Any suggestions on how to prevent the appending of new rows until the mandatory columns have been filled?
<eo:MaskedEditColumn HeaderText="Brand ID" DataField="BrandID" Width="150" meta:resourcekey="GridColumn2" AllowResize="false" > <MaskedEdit ID="MaskedEdit1" > <eo:MaskedEditSegment SegmentType="Mask"Mask="Aaaaaaaaaa"IsRequired="true"> </eo:MaskedEditSegment> </MaskedEdit> </eo:MaskedEditColumn>
Hope you can help as this is a fairly urgent requirement.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Even MaskedEdit can be empty, so you will have to write code to check on that. The easiest way is to do it on the server side, you would just check whether user has filled the cell, and if they haven't, asks user to correct it. You can also do it on the client side but usually you still have to do the server side checking to avoid advanced user by passing your client side checking.
Thanks
|