Answered by:
Create HTML grid view

Question
-
User-1141190189 posted
How i can create html gridview dynamically using c#, and its columns is editable in order to save them?
i need an example please?
Tuesday, October 11, 2016 2:42 PM
Answers
-
User1724605321 posted
Hi Sanfoor,
how to make a column editable? and how to read this column value in order to save it to the database?Please refer to below link for code sample :
http://burnignorance.com/asp-net-developer-tips/dynamically-addingdeleting-rows-to-table/
Or use asp.net gridview , Refer to below code sample which meets your requirement :
http://www.aspsnippets.com/Articles/Add-new-Row-to-GridView-on-Button-Click-in-ASPNet.aspx
Or using javascript in html table :
Best Regards,
Nan Yu
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 17, 2016 8:39 AM
All replies
-
User1724605321 posted
Hi sanfoor ,
How i can create html gridview dynamically using c#, and its columns is editable in order to save them?Could you explain more about your requirement ? What do you mean by "HTML gridview" ? If you want to dynamically add BoundField and TemplateField Columns to GridView , you could refer to below link :
If you want to dynamically create a html table in c#. you could refer to below link :
http://www.java2s.com/Tutorial/ASP.NET/0080__HTML-Controls/DynamicallycreateaHTMLtableC.htm
Best Regards,
Nan Yu
Wednesday, October 12, 2016 7:29 AM -
User-1141190189 posted
Great, thank you Nan Yu
actually i want to dynamically create html table in c#.
i have used your code, but after i create the table i want to be able to make let us say the last column editable
i.e the user can fill some data, then save it to data base.
could you please help me? how to make a column editable? and how to read this column value in order to save it to the database?
many thanks
Wednesday, October 12, 2016 12:25 PM -
User1724605321 posted
Hi Sanfoor,
how to make a column editable? and how to read this column value in order to save it to the database?Please refer to below link for code sample :
http://burnignorance.com/asp-net-developer-tips/dynamically-addingdeleting-rows-to-table/
Or use asp.net gridview , Refer to below code sample which meets your requirement :
http://www.aspsnippets.com/Articles/Add-new-Row-to-GridView-on-Button-Click-in-ASPNet.aspx
Or using javascript in html table :
Best Regards,
Nan Yu
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 17, 2016 8:39 AM