How can I able to use validation summary for UltrawebGrid
Iam using like this.
It shows error message then and there itself not in the validation summary.
Is there is any wrong in my code.
<Bands >
<igtbl:UltraGridBand >
<Columns >
<igtbl:TemplatedColumn HeaderText="No Of Materials" >
<Header Caption = "No Of Materials" >
<RowLayoutColumnInfo OriginX="2" />
</Header>
<Footer>
</Footer>
<Validators >
<igtbl:ValidatorItem Value = "NumericValue" />
<igtbl:ValidatorItem Value = "reqNoOfMaterials" />
<igtbl:ValidatorItem Value = "valSum" />
</Validators>
</igtbl:TemplatedColumn>
</Bands>
</igtbl:UltraWebGrid>
<asp:RequiredFieldValidator ID = "reqNoOfMaterials" ControlToValidate = "uwgEditPrice" ErrorMessage = "Required" runat = "server" Display = "Static" ValidationGroup = "btnSave" ></asp:RequiredFieldValidator>
Thanks
Before you tear your hair out, the grid can only support validation on the cell level, after an edit action. Unfortunately it doesn't support validating the entire contents in a mode where the validation summary can be used. Luckily, the specialized editors available for the grid ensure that data meets constraints as it is entered, rather than relying on a batch style validation. Of course, I do understand that there are cases where using the ValidationSummary would be useful, and hopefully we can support this case in the future. I'd recommend that anyone reading this thread who thinks this is a valuable feature, weigh in by submitting a feature request - http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Regards,
-Tony
Tony,
I have a requiredFieldValidator to a couple of my columns. It does validate when you step into those required cells. However, when I input a data into a required cell, and then add a new row, it doesn't validate the rest of the cell in my last row. It would validate if I go back to the row and click on another required cell, but its too late to validate once you are in the next row. You said it wouldn't validate unless it's an edit action, but is there a way to validate the rest of the cells in the previous row after attempting to add a new row? I just see potentially a lot of human errors.
Cheryl
Pandu,
Try setting the grid's position to "relative". The editor is absolutely positioned on the screen, so as you scroll, the editor will stay fixed absolutely with respect to its container. If the grid doesn't have a position set on it, the editor will be positioned with respect to the page - causing the problem you're running into.
Hope this helps,
Hi Tony,
I have a question regarding validation in a grid:
I am using cell level validation and it works fine. THe problem comes when the user inputs wrong data and it is vaidated. Then user scrolls the page, grid scrolls with the page but the edit box stays fixed. Is there a way to fix this?
Thanks,
Pandu
Hi Cheryl,
There are a couple of things you can do to make life easier for yourself and the application's users. First, you can use the rowedit template, and perform validation when the template is closed. This can grealy improve the editing experience.
Second, you can implement your own "add new" functionality, by creating a separate mechanism for adding new rows. You can use the client-side object model to add rows to the grid. So if you display a separate input form where they MUST enter valid data before clicking "add", you can again improve the experience and reduce the error rate.
Lastly, you may want to look at using the "Fixed AddNewRow". By setting StationaryMargins to fixed, you can force a row to remain at the top (or bottom) of the grid, creating an input mechanism which will contain the same editors and validators as other cells in your grid.
Hope that these ideas help,