0

I have a grid view with more than one control (ie. a DropDownList and a TextBox)

How can I bind the DropDownList in the gridview and how do I insert an add button in the footer of the gridview

I have found a few ways to do this but they are confusing and I am not sure about the performance of them.

3
  • It seems you are asking for code to be written over here which might not sound great, come with the exact difficulties you are facing Commented Jun 27, 2011 at 11:22
  • the problem i face is about create new row with the control(empedded) without drawback in the performce. Commented Jun 27, 2011 at 11:42
  • Whats the problem with grid.Rows.Add()? Commented Jun 27, 2011 at 11:52

3 Answers 3

2

If you want a flexible control of the layout and still get all the power of GridView, I suggest that you look into ListView. You have control over the template for layout, footer, item and etc. which sounds like what you need. Here is the comparison between ListView, GridView and others.

http://weblogs.asp.net/anasghanem/archive/2008/09/06/comparing-listview-with-gridview-datalist-and-repeater.aspx

Sign up to request clarification or add additional context in comments.

Comments

1

Take a look here: Adding an insert row to GridView.

It provides a full code sample that is easy to follow. In terms of performance, adding a row will require a postback but you can wrap your GridView in an UpdatePanel and very easily have a seemingly AJAXified GridView.

Comments

1

you can keep searching in Google and find good example's.

These links may help you:

1 Comment

CodeProject link help you directly in custom column, and stackoverFlow link help you to create footer for grid with link-button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.