Maen
Maen

Reputation: 1030

Dynamically Add Custom Row to a GridView

I have a gridview which is databound, I want to dynamically add a row with data that I define and away from the databound data, how can I do it?

Upvotes: 0

Views: 2327

Answers (2)

user94893
user94893

Reputation:

On Client Side using DOM or jQuery to add new row.

On Server Side You must inherit GridView control and override Render function to modify output HTML.

But I don't suggest you to this. Because It break beatiful of OOP programming and It hard to debug when error occur.

Upvotes: 1

Kirtan
Kirtan

Reputation: 21695

For that, you'll have to add an item in your original data source only, coz there's no other way of doing it. To the new item that you added to your data source, you can then add the data you want.

Upvotes: 0

Related Questions