ASP.NET Repeater Control

Is it Possible in Repeater control to do a functionality of Edit, Update, Delete as Gridview,listview and etc Data binding Control?

Questions by Con2Vini   answers by Con2Vini

Showing Answers 1 - 19 of 19 Answers

Ajit

  • Oct 1st, 2011
 

No

Repeater control to does not a functionality of Edit, Update, Delete as Gridview,listview

Aruna

  • Oct 12th, 2011
 

No,Cant do any edit ,update and delete operation for the repeater control,this is used for only to display the data.

  Was this answer useful?  Yes

Manish Pandey

  • Oct 13th, 2011
 

Yes functionally it is possible to add,Edit and delete using repeater control as you can define the template in repeater control(e.g Text box for editing) and u can find that template controls at run time for I/U/D process

  Was this answer useful?  Yes

suresh

  • Feb 2nd, 2012
 

Repeater control does not provide any facilities like editing,paging etc....but compared to datalist,datagridview the execution is fast.......

Yes, in repeater control we can also provide all the functionality like other control but for that a developer have to write a code for that like in use link button & in command name property set to appropriate name
eg .....

C# code for update command

Code
  1.  

  2. protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)

  3. {

  4. switch (e.CommandName)

  5. {

  6. case "Update":

  7.  

  8. UpdateMovie(e);

  9.  

  10. break;

  11. case "Insert":

  12.  

  13. InsertMovie(e);

  14. break;

  15. case "delete":

  16. DeleteMovie(e);

  17. break;

  18. }

  19.  

  20. }

  21.  

  22. void UpdateMovie(RepeaterCommandEventArgs e)

  23. {

  24.  

  25. TextBox txt1 = (TextBox)e.Item.FindControl("TextBox1");

  26. TextBox txt2 = (TextBox)e.Item.FindControl("TextBox2");

  27. TextBox txt3 = (TextBox)e.Item.FindControl("TextBox3");

  28. CheckBox chk = (CheckBox)e.Item.FindControl("CheckBox1");

  29.  

  30. SqlDataSource1.UpdateParameters["eno"].DefaultValue = txt1.Text;

  31. SqlDataSource1.UpdateParameters["ename"].DefaultValue = txt2.Text;

  32. SqlDataSource1.UpdateParameters["code"].DefaultValue = txt3.Text;

  33. SqlDataSource1.UpdateParameters["gender"].DefaultValue = chk.Checked.ToString();

  34.  

  35. SqlDataSource1.Update();

  36.  

  37. }

  38.  

  Was this answer useful?  Yes

Aarti Helkar

  • Apr 9th, 2012
 

Yes, repeater also have that capability to edit,delete and update the record.

We have to explicitly write the code for that, as we write for the binding of db.

  Was this answer useful?  Yes

Urmi

  • Apr 20th, 2012
 

No.The Repeater control is used to display a repeated list of items that are bound to the control. The Repeater control may be bound to a database table, an XML file, or another list of items.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions