Click here to Skip to main content
16,021,288 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have a listview that displays data programiticaly and I added the formview using a linqDataSource to be able to edit the selected row in the listview(current listview shows only a few fields) but the user should be able to edit all the data in the formview. problem is i cant get the formview to display/edit data of the selected field...always displays the default row kinldy help.

he is my code behind:
C#
protected void ListView1_ItemEditing1(object sender, ListViewEditEventArgs e)
   {

       String itemID = ListView1.DataKeys[e.NewEditIndex].Value.ToString();
       myItemsData.SelectParameters["MyItemID"].DefaultValue = itemID;
       FormView1.ChangeMode(FormViewMode.Edit);
       FormView1.DataBind();

   }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900