Click here to Skip to main content
15,893,381 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help with Code conversion Pin
Dave Kreskowiak26-Jan-06 8:39
mveDave Kreskowiak26-Jan-06 8:39 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 8:01
TMF32026-Jan-06 8:01 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 8:34
TMF32026-Jan-06 8:34 
AnswerRe: Help with Code conversion Pin
James Gupta26-Jan-06 7:40
professionalJames Gupta26-Jan-06 7:40 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 9:46
TMF32026-Jan-06 9:46 
GeneralRe: Help with Code conversion Pin
James Gupta26-Jan-06 10:23
professionalJames Gupta26-Jan-06 10:23 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 10:29
TMF32026-Jan-06 10:29 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 11:24
TMF32026-Jan-06 11:24 
James,

What I was able to discover was that if I followed intellisense and used Item instead of LinkItem I was able to get by the error:

if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))

This however, produced another error which I haven't been able to get by:

Cannot implicitly convert type 'object' to 'System.Data.DataRowView'. An explicit conversion exists (are you missing a cast?)

This is referencing line:
DataRowView oDrv = e.Item.DataItem;

From the following code:
<br />
<small><br />
public void Customers1_ItemDataBound(Object sender, RepeaterItemEventArgs e) <br />
    {<br />
        if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) <br />
        {<br />
            //This is to look for the Customer2.Repeater that is nested inside the Customer1.Repeater.<br />
            Repeater oRPT = (Repeater)e.Item.FindControl("Customer2");<br />
            DataRowView oDrv = e.Item.DataItem;<br />
            //This line is to retrieve only the records in the CTPT table that have the same ItemID as the HSCTI record in the current row.<br />
            oRPT.DataSource = oDrv.CreateChildView("ItemID");<br />
            oRPT.DataBind();<br />
        }<br />
    }<br />
<br />
    //Show all related Comments on the Customers2 Repeater.<br />
    public void Customers2_ItemDataBound(Object sender, RepeaterItemEventArgs e)<br />
    {<br />
        if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) <br />
        {<br />
            //This is to look for the Customer2.Repeater that is nested inside the Customer2.Repeater.<br />
            Repeater oRPT = (Repeater)e.Item.FindControl("Customer3");<br />
            DataRowView oDrv = e.Item.DataItem;<br />
            //This line is to retrieve only the records in the CTPT table that have the same ItemID as the HSCTI record in the current row.<br />
            oRPT.DataSource = oDrv.CreateChildView("ct_number");<br />
            oRPT.DataBind();<br />
        }<br />
    }<br />
</small><br />


Do you have any thoughts on this?

Thank you for your help. Trying to meet a deadline by morning. Will be here all night if necessary.

Regards,

Tim
GeneralRe: Help with Code conversion Pin
Dan Neely26-Jan-06 11:29
Dan Neely26-Jan-06 11:29 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 11:41
TMF32026-Jan-06 11:41 
GeneralRe: Help with Code conversion Pin
James Gupta26-Jan-06 12:02
professionalJames Gupta26-Jan-06 12:02 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 12:39
TMF32026-Jan-06 12:39 
GeneralRe: Help with Code conversion Pin
TMF32027-Jan-06 2:43
TMF32027-Jan-06 2:43 
QuestionA transparent label? Pin
drc_no126-Jan-06 6:57
drc_no126-Jan-06 6:57 
AnswerRe: A transparent label? Pin
James Gupta26-Jan-06 7:39
professionalJames Gupta26-Jan-06 7:39 
GeneralRe: A transparent label? Pin
drc_no126-Jan-06 7:41
drc_no126-Jan-06 7:41 
QuestionHelp! Access generic list data in App_code class from code behind Pin
Sue_NC26-Jan-06 6:38
Sue_NC26-Jan-06 6:38 
QuestionBeginners Question - User Controls Pin
MarkMokris26-Jan-06 6:36
MarkMokris26-Jan-06 6:36 
AnswerRe: Beginners Question - User Controls Pin
DigitalKing26-Jan-06 9:23
DigitalKing26-Jan-06 9:23 
QuestionModeless display - UserControl! Pin
DotNetInterest26-Jan-06 6:23
DotNetInterest26-Jan-06 6:23 
Questionvb convert c#, passing parameter crystal rpts Pin
steve1_rm200026-Jan-06 5:40
steve1_rm200026-Jan-06 5:40 
AnswerRe: vb convert c#, passing parameter crystal rpts Pin
J4amieC26-Jan-06 5:53
J4amieC26-Jan-06 5:53 
NewsRe: vb convert c#, passing parameter crystal rpts Pin
steve1_rm200027-Jan-06 1:05
steve1_rm200027-Jan-06 1:05 
QuestionThe network Problem is Solved but..... Pin
snouto26-Jan-06 4:08
snouto26-Jan-06 4:08 
AnswerRe: The network Problem is Solved but..... Pin
J4amieC26-Jan-06 5:46
J4amieC26-Jan-06 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.