CustomValidation Control

Discussion in 'ASP .Net' started by =?Utf-8?B?Ym9iYnk=?=, Sep 12, 2007.

  1. I have a drop down list in my asp page. when I selectg an irem and click on
    a button it appears in the Grid view. But when I again come to the same page
    and click on the same item from Drop down list it and click on button it
    again add the same item onin the Grid view. So I need some validatiobn that
    if this item appears in Grid view Don't add in the Grid view. I can use
    customValidation contro. But I don't know how to use it.
     
    =?Utf-8?B?Ym9iYnk=?=, Sep 12, 2007
    #1
    1. Advertising

  2. Hi bobby,

    you should design your page more user friendly. Your drop down list
    shouldn't contain items already added to grid view. You can easyly achieve
    this in datasource for your drop down list. If content for your drop down
    list is defined directly in page you should use handler of grid view's
    RowDataBound event to remove items from drop down list.

    This is easyer to implement then checking grid view content in custom
    validator.

    Best regards,
    Ladislav

    "bobby" wrote:

    > I have a drop down list in my asp page. when I selectg an irem and click on
    > a button it appears in the Grid view. But when I again come to the same page
    > and click on the same item from Drop down list it and click on button it
    > again add the same item onin the Grid view. So I need some validatiobn that
    > if this item appears in Grid view Don't add in the Grid view. I can use
    > customValidation contro. But I don't know how to use it.
     
    =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?=, Sep 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?cm9kY2hhcg==?=

    datagrid template columns and customvalidation

    =?Utf-8?B?cm9kY2hhcg==?=, Oct 16, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    439
    =?Utf-8?B?RmVybmFuZG8gSHVudGg=?=
    Jan 11, 2005
  2. kpg
    Replies:
    2
    Views:
    786
    Peter Blum
    Dec 22, 2004
  3. Craig Buchanan
    Replies:
    1
    Views:
    377
    Peter Bucher [MVP]
    Sep 10, 2008
  4. Craig Buchanan

    Web User Control with CustomValidation and Javascript

    Craig Buchanan, Aug 18, 2008, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    788
    Peter Bucher [MVP]
    Sep 10, 2008
  5. Craig Buchanan

    Web User Control with CustomValidation and Javascript

    Craig Buchanan, Aug 18, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    160
    Peter Bucher [MVP]
    Sep 10, 2008
Loading...

Share This Page