Validation (using validators) between rows in GridView

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Aug 2007
Posts: 55
Reputation: culebrin is an unknown quantity at this point 
Solved Threads: 1
culebrin culebrin is offline Offline
Junior Poster in Training

Validation (using validators) between rows in GridView

 
0
  #1
Jul 10th, 2009
Hi,

I have a DropDownList (filled in the rowCreated method) in a TemplateColumn in a GridViewRow.
A user can add a row to select another value in the new dropdownlist created.

I need to trigger a validator (I need this because this is only a small part of a site that shows validations using the validatorcalloutextender and I am trying to avoid to simulate the funcionality of the validator) that validates if someone tries to select the same value of the dropdownlist...

I just wonder if that can be possible, or, I just have to settle with the simulation...

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 55
Reputation: culebrin is an unknown quantity at this point 
Solved Threads: 1
culebrin culebrin is offline Offline
Junior Poster in Training

Re: Validation (using validators) between rows in GridView

 
0
  #2
Jul 10th, 2009
Hi again,

I found my own answer... I used CustomValidator and set the OnServerValidate property to a method on the codebehind to go through the gridview comparing the SelectedValue of the current dropdownlist...

I hope that helps to someone... If anyone want some code, send me a private message...

Thanks again!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC