Solved

Formview DataRowView

Posted on 2006-07-08
2
917 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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