Editable Datagrid DropDownList

Discussion in 'ASP .Net' started by anon, Apr 14, 2004.

  1. anon

    anon Guest

    Hi All,
    I have an editable datagrid in which one of the fields becomes a Drop
    dowl list in edit mode....i followed the example in the $ guysfrom rolla
    article
    http://www.4guysfromrolla.com/webtech/050801-1.2.shtml
    however one of them is not really populated from the database, and hence
    no need of a dataview...i would like to assign an array or arraylist
    alone to it, however it gives all sorts of errors....the code is as
    follows

    <asp:TemplateColumn HeaderText="Zone">
    <ItemTemplate>
    <asp:Label ID="lblZone" Runat="server">
    <%# DataBinder.Eval(Container.DataItem,"cZone") %>
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:DropDownList ID="ddl1" Runat="server"
    DataTextField="c1Zone" DataSource="<%#zoned%>"></asp:DropDownList>
    </EditItemTemplate>
    </asp:TemplateColumn>


    public void zone()
    {
    ArrayList zoned = new ArrayList();
    zoned.Add("GMT-05:00(E.S.T)");
    zoned.Add("GMT-04:00(Atlantic Time)");
    zoned.Add("GMT+10:00(Australia)");
    zoned.Add("GMT+05:30(Asia)");
    zoned.Add("GMT-06:00(Central)");
    zoned.Add("GMT-08:00(Pacific)");

    }


    Any ideas or links to articles will be helpful...
    thanks
    Ben


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    anon, Apr 14, 2004
    #1
    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. Stephan Bour

    DropDownList in editable DataGrid

    Stephan Bour, Feb 3, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,627
    Spodgy
    May 16, 2006
  2. Daniel Doyle
    Replies:
    0
    Views:
    3,486
    Daniel Doyle
    Oct 28, 2005
  3. Daniel Doyle
    Replies:
    0
    Views:
    483
    Daniel Doyle
    Oct 28, 2005
  4. Replies:
    0
    Views:
    442
  5. anon

    Editable Datagrid Dropdownlist error

    anon, Apr 20, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    124
    Scott Mitchell [MVP]
    Apr 21, 2004
Loading...

Share This Page