I am currently populating my drop down lists with a collection of values
which I enter in the html code itself:
<asp

ropDownList id=ddlFee runat="server" Width="80px"
DataMember="OptionRequestCRM" DataSource="" DataTextField="Fee"
DataValueField="OptionID">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp....etc...
Since I am populating my drop down this way, is there another solution????
"cfaul" <> wrote in message
news: om...
> "Josh Behl" <> wrote in message
news:<#$>...
> > I've got my datagrid working to the point where I can edit records and
even
> > pick different values in my dropdownlists, save the record and have that
> > data committed to the table. The problem I am having is that when I go
into
> > edit a record each of my picklist values get reset to the first value in
the
> > list.
> >
> >
> > How can I fix this??
> >
> > Josh Behl
>
> Hi Josh
>
> This is possibly happening because you dont have an 'isPostBack'
> condition in your page_load sub. When you push the button to execute,
> the page_load sub is called and your dropdownlists will be populated
> again, using the first value of the list as the 'selected value'. This
> can be fixed by putting the initial page loading code inside the
> following if statement:
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> If Not IsPostBack Then
> 'Populate dropdownlist
> End If
>
> End Sub
>
> Good luck