By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,018 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,018 IT Pros & Developers. It's quick & easy.

Repeater Control and Validation in each row

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.