Click here to Skip to main content
15,888,330 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Generate Sequential Number without database Pin
Maikeru20002-Aug-10 5:16
Maikeru20002-Aug-10 5:16 
AnswerRe: Generate Sequential Number without database Pin
T M Gray27-Jul-10 10:23
T M Gray27-Jul-10 10:23 
GeneralRe: Generate Sequential Number without database Pin
Maikeru200027-Jul-10 10:40
Maikeru200027-Jul-10 10:40 
GeneralRe: Generate Sequential Number without database Pin
T M Gray27-Jul-10 10:44
T M Gray27-Jul-10 10:44 
AnswerRe: Generate Sequential Number without database Pin
Adam R Harris28-Jul-10 8:52
Adam R Harris28-Jul-10 8:52 
Questiontips&tricks template Pin
farokhian27-Jul-10 5:39
farokhian27-Jul-10 5:39 
AnswerRe: tips&tricks template Pin
David Mujica27-Jul-10 6:02
David Mujica27-Jul-10 6:02 
Questionerror in dataRelation in asp.net [modified] Pin
Dhyanga27-Jul-10 3:08
Dhyanga27-Jul-10 3:08 
Hi i am trying to use data relation in my program.I have two repeaters used one nested another.
part of code is shown below:

 void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            RepeaterItem item = e.Item;
            if ((item.ItemType == ListItemType.Item) ||
                (item.ItemType == ListItemType.AlternatingItem))
            {

                Repeater2 = (Repeater)e.Item.FindControl("Repeater2");
                DataRowView drv = (DataRowView)item.DataItem;
                Repeater2.DataSource = drv.CreateChildView("categoryItem");
                Repeater2.DataBind();
            }
        }

the error is :
<pre>
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The relation is not parented to the table to which this DataView points.

Source Error:

Line 121:                Repeater2 = (Repeater)e.Item.FindControl("Repeater2");
Line 122:                DataRowView drv = (DataRowView)item.DataItem;
Line 123:                Repeater2.DataSource = drv.CreateChildView("categoryItem");
Line 124:                Repeater2.DataBind();


This categoryItem is from this code:

objDA.Fill(ds);
            Repeater1.DataSource = ds;
            Repeater1.DataBind();
          
            DataColumn c1 = ds.Tables["category"].Columns["ID"];
            DataColumn c2 = ds.Tables["Item"].Columns["ProposalID"];
            dRel = new DataRelation("categoryItem", c1, c2);
            ds.Relations.Add(dRel);


Can anyone please figure it out why that error is there ?
suchita
modified on Tuesday, July 27, 2010 9:20 AM

AnswerRe: error in dataRelation in asp.net Pin
Dhyanga27-Jul-10 7:19
Dhyanga27-Jul-10 7:19 
AnswerREPOST Pin
Not Active27-Jul-10 8:58
mentorNot Active27-Jul-10 8:58 
GeneralProblem not solved yet: error in using dataRelation in asp.net Pin
Dhyanga28-Jul-10 4:23
Dhyanga28-Jul-10 4:23 
QuestionJquery in asp.net Pin
Satish_S27-Jul-10 2:16
Satish_S27-Jul-10 2:16 
AnswerRe: Jquery in asp.net Pin
Yusuf27-Jul-10 4:12
Yusuf27-Jul-10 4:12 
GeneralRe: Jquery in asp.net Pin
Satish_S27-Jul-10 19:33
Satish_S27-Jul-10 19:33 
GeneralRe: Jquery in asp.net Pin
Not Active28-Jul-10 3:35
mentorNot Active28-Jul-10 3:35 
Questionsql backup through asp.net in script format Pin
gautamamit827-Jul-10 1:22
gautamamit827-Jul-10 1:22 
QuestionHow to Load another web site page content into my Web Page Application Pin
Sandilian26-Jul-10 20:37
Sandilian26-Jul-10 20:37 
AnswerRe: How to Load another web site page content into my Web Page Application Pin
Arun Jacob26-Jul-10 21:12
Arun Jacob26-Jul-10 21:12 
AnswerRe: How to Load another web site page content into my Web Page Application Pin
Sandesh M Patil27-Jul-10 6:46
Sandesh M Patil27-Jul-10 6:46 
Questionget back vs2005 project? Pin
Member 387988126-Jul-10 18:49
Member 387988126-Jul-10 18:49 
AnswerRe: get back vs2005 project? Pin
Arun Jacob26-Jul-10 19:12
Arun Jacob26-Jul-10 19:12 
Questionnested repeater Pin
Dhyanga26-Jul-10 5:48
Dhyanga26-Jul-10 5:48 
AnswerRe: nested repeater Pin
Not Active26-Jul-10 6:15
mentorNot Active26-Jul-10 6:15 
GeneralRe: nested repeater Pin
Dhyanga26-Jul-10 6:22
Dhyanga26-Jul-10 6:22 
GeneralRe: nested repeater Pin
Martin Jarvis26-Jul-10 6:47
Martin Jarvis26-Jul-10 6:47 

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.