Solved

Formview DataRowView

Posted on 2006-07-08
2
913 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
Comment Utility
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
Comment Utility
got you!!!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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 tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

16 Experts available now in Live!

Get 1:1 Help Now