471,092 Members | 1,035 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Repeater Control and Validation in each row

Hello,
I am using a Repeater control to display data and also allow data editing. I
simply have text boxes in my repeater template and allow the user to make
changes as needed.. I also allow users to enter new rows. I do this by
showing them a blank row.

The question I now have is:
1) In the new row, if the user supplies data to only 2 columns out of the
three "required" columns, I want to do a validation and ask them to provide
the data.

2) However, if the user choose not to enter a new row (leaves all the text
boxes empty), I do not want to raise any validation error..

Is this possible in a repeater control..? Any help will be appreciated.

I do not want to user DataGrid and prefer to use Repeater for some other
reasons.

Thanks.

Sep 18 '06 #1
1 3204
the simplest would be to have a CustomValidator and use a simple server-side
check on the new-row text boxes. in your button click event, make sure to
use this:

If(!Page.IsValid)
return;

see the SDK for examples on using a CustomValidator if you need more info on
these.

hope this helps
tim
"Ganesh Muthuvelu" <Ga*************@discussions.microsoft.comwrote in
message news:04**********************************@microsof t.com...
Hello,
I am using a Repeater control to display data and also allow data editing.
I
simply have text boxes in my repeater template and allow the user to make
changes as needed.. I also allow users to enter new rows. I do this by
showing them a blank row.

The question I now have is:
1) In the new row, if the user supplies data to only 2 columns out of the
three "required" columns, I want to do a validation and ask them to
provide
the data.

2) However, if the user choose not to enter a new row (leaves all the text
boxes empty), I do not want to raise any validation error..

Is this possible in a repeater control..? Any help will be appreciated.

I do not want to user DataGrid and prefer to use Repeater for some other
reasons.

Thanks.

Sep 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jorge Ayala | last post: by
2 posts views Thread by Thomas R | last post: by
1 post views Thread by Dot net work | last post: by
1 post views Thread by olduncleamos | last post: by
2 posts views Thread by =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post: by
5 posts views Thread by Peter Larsen [CPH] | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.