开发者

Inserting new row in gridview using an external Add button and a list as data source

I have a grid with three columns, two of which contain drop-downs, all of them getting filled from a web service result set. Now I want to allow the functionality of adding a new record in the grid by clicking an Add button present outside the gridview.

Whenever the user clicks the Add button, a new record should be created in the grid with value list filled in the drop-downs with the available options开发者_如何学Go.

What is the best possible way to achieve this considering extensibility in mind.

Thanks a lot!

P.S. The data source set for the grid is a list.


Add a blank item to the list, and rebind with this new list and dummy item. That's typically one way to do it, or store the insert form in the footer of the columns. I've used that approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜