GeekInterview.com
Series: Subject: Topic:
Question: 16 of 348

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?
Asked by: Con2Vini | Member Since Aug-2011 | Asked on: Sep 15th, 2011

View all questions by Con2Vini   View all answers by Con2Vini

Showing Answers 1 - 7 of 7 Answers
Ajit

Answered On : Oct 1st, 2011

No

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

Yes  1 User has rated as useful.
  
Login to rate this answer.
Aruna

Answered On : 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.

  
Login to rate this answer.
Manish Pandey

Answered On : 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

  
Login to rate this answer.
suresh

Answered On : Feb 2nd, 2012

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

Yes  1 User has rated as useful.
  
Login to rate this answer.
nitu_thakkar

Answered On : Mar 16th, 2012

View all answers by nitu_thakkar

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.  

  
Login to rate this answer.
Aarti Helkar

Answered On : 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.

  
Login to rate this answer.
Urmi

Answered On : 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.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.