• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 925
  • Last Modified:

Formview DataRowView

Hello experts,

I am needing to a record from my DataRowView to make some calculations and then bind the result to a label control.
How do I achieve this if the control being used is a formview control.

In a datalist control, I do the following;-
 string DOORPLAN = ((DataRowView)e.Item.DataItem)["DOORPLAN"].ToString();

in the ItemDataBound event of the control

protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
    {
             string DOORPLAN = ((DataRowView)e.Item.DataItem)["DOORPLAN"].ToString();
             ///do stuff then bind result to control
    }


What is the equivalent for formviews
0
claracruz
Asked:
claracruz
1 Solution
 
deanvanrooyenCommented:
does the formview have something like this eg templates?:
 <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" DataKeyNames="PhotoID">
        <ItemTemplate>
          <asp:Label ID="CaptionLabel" runat="server" Text='<%# Eval("Caption") %>' Font-Size="32pt" /><br />
        </ItemTemplate>
</asp:FormView>
0
 
claracruzAuthor Commented:
got you!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now