Solved

Formview DataRowView

Posted on 2006-07-08
2
915 Views
Last Modified: 2007-12-19
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
Comment
Question by:claracruz
2 Comments
 
LVL 12

Accepted Solution

by:
deanvanrooyen earned 500 total points
ID: 17067349
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
 
LVL 4

Author Comment

by:claracruz
ID: 17067364
got you!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Calling web service and its methods dynamically 2 35
Jquery autocomplete 10 67
Why is some text in blue in Visual Studio? 6 22
ASP.NET 5 Templates 2 64
AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now