beginners dropdown question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yog

    beginners dropdown question

    I am using the following to select an item in a dropdown at runtime.

    If its a bad data and item doesn't exists in dropdown it errors out, is
    there any other way to avoid this.

    Thank you.

    this.CTRY_CD1.I tems.FindByValu e(oDrSBAD1["CTRY_CD"].ToString().Tri m()).Selected = true;


  • Scott M.

    #2
    Re: beginners dropdown question

    Check the data item to be searched on for a null value before selecting it.

    "Yog" <Yog@discussion s.microsoft.com > wrote in message
    news:17588026-1085-453D-B56A-31CEF0BAFB3A@mi crosoft.com...[color=blue]
    >I am using the following to select an item in a dropdown at runtime.
    >
    > If its a bad data and item doesn't exists in dropdown it errors out, is
    > there any other way to avoid this.
    >
    > Thank you.
    >
    > this.CTRY_CD1.I tems.FindByValu e(oDrSBAD1["CTRY_CD"].ToString().Tri m()).Selected
    > = true;
    >
    >[/color]


    Comment

    Working...