0

i am new in mvc. i want to generate a UI dynamically like

initially a table will be displayed with four columns and 5 rows. in first & second columns there will be dropdown with predefine values and in last column there will be textbox. there will be a button called add more and when user will click on that button then a postback will occur and a new row will be added to that existing column. user can remove any column just clicking on another button which will be in fourth column.

it is very easy to do it in webform with gridview but i have no idea how can i do it in mvc. i do not want to use any js library or grid rather i want to do it with html table which i will generate dynamically. please help me with concept & sample code snippet if possible. thanks

Thomas
  • 33,544
  • 126
  • 357
  • 626

1 Answers1

0

I cant see here something really connected with mvc.

The case is that you would like to have an interactive UI, that basically is the job of Javascript.

If we are talking about grids, it can be next plugins/frameworks:

So basically this is the same (like) Grid View from asp.net.

If you wanna have something exactly like GridView - I think there is no native implementation (from Visual Studio) for this (maybe i'm wrong, but 4 year experience say to me that i'm right :) ).

Community
  • 1
  • 1
Evgeniy Labunskiy
  • 2,012
  • 3
  • 27
  • 45
  • thanks for answer. 1) just tell me how do i generate html table with 4 column & 4 rows. dropdown will be there in first & two column with predefine value. 2) when i will click on button add more then how can i capture all values at controller end of that table ? can u give me some sample code to start the coding. thanks – Thomas Jul 25 '13 at 08:04
  • http://stackoverflow.com/questions/14079003/asp-net-mvc-4-datagrid Probably a good example with code – Evgeniy Labunskiy Jul 25 '13 at 08:30
  • Example using mvccontrib library - http://blogs.msdn.com/b/paulwhit/archive/2009/03/28/walkthrough-full-example-of-using-mvccontrib-grid-with-jquery-datatable.aspx – Evgeniy Labunskiy Jul 25 '13 at 08:31
  • i want to generate table in for and want to put dropdown in first & second columns in all rows. can u please tell me how could i do this.if possible provide sample code for generating html table in loop thanks. – Thomas Jul 25 '13 at 08:48
  • Kendo UI is free or paid library to use in project? – Thomas Jul 25 '13 at 12:13
  • Kendo UI is free for non-commercial usage – Evgeniy Labunskiy Jul 25 '13 at 13:12