DataItem = Nothing in DotNetNuke

Discussion in 'ASP .Net' started by Pierre Dippenaar, May 13, 2004.

  1. I recently installed DotNetNuke and started using it and it's
    framework. One thing I have a problem with is that the CBO functions
    (FillCollection) returns ArrayLists and this is then bound to
    DataGrids etc. When you then access the DataGrid Commands there are no
    value in e.Item.DataItem. What I would like to do in the ItemDataBound
    Sub, is the following:

    Dim dr As DataRowView = CType(e.Item.DataItem, DataRowView)
    Dim ddlType As DropDownList
    ddlType = CType(e.Item.FindControl("ddlType"), DropDownList)
    ddlType.Items.FindByValue(dr("Type")).Selected = True

    This works when you bind a DataTable to a grid but not with an
    ArrayList.

    Can anyone please help?
    Pierre Dippenaar, May 13, 2004
    #1
    1. Advertising

  2. try asking at the dotnetnuket group at www.asp.net forums

    --
    Regards

    John Timney
    Microsoft Regional Director
    Microsoft MVP


    "Pierre Dippenaar" <> wrote in message
    news:...
    > I recently installed DotNetNuke and started using it and it's
    > framework. One thing I have a problem with is that the CBO functions
    > (FillCollection) returns ArrayLists and this is then bound to
    > DataGrids etc. When you then access the DataGrid Commands there are no
    > value in e.Item.DataItem. What I would like to do in the ItemDataBound
    > Sub, is the following:
    >
    > Dim dr As DataRowView = CType(e.Item.DataItem, DataRowView)
    > Dim ddlType As DropDownList
    > ddlType = CType(e.Item.FindControl("ddlType"), DropDownList)
    > ddlType.Items.FindByValue(dr("Type")).Selected = True
    >
    > This works when you bind a DataTable to a grid but not with an
    > ArrayList.
    >
    > Can anyone please help?
    John Timney \(Microsoft MVP\), May 13, 2004
    #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. D_G

    Skins for DotNetNuke available

    D_G, Feb 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    840
    aks_2884
    Nov 8, 2006
  2. =?Utf-8?B?QmVuamFtaW4=?=
    Replies:
    0
    Views:
    301
    =?Utf-8?B?QmVuamFtaW4=?=
    Feb 12, 2004
  3. Bill Woodruff
    Replies:
    0
    Views:
    405
    Bill Woodruff
    Aug 27, 2004
  4. Michael Washington
    Replies:
    0
    Views:
    435
    Michael Washington
    Oct 12, 2004
  5. Devin Jeanpierre
    Replies:
    2
    Views:
    427
    Devin Jeanpierre
    Feb 14, 2012
Loading...

Share This Page