C # Asp.net mvc how to display the DataTable object in the form of a table, which has the ability to edit fields and add new rows

  • one
    All these features are added to the usual html table using js. Or use the finished component on js. For example - jqgrid - teo van kot
  • @teovankot and if I do not know the structure of the table, then a table of any structure can come, but it should be displayed and be able to add / change / delete elements - Nakipatop
  • For some components, you can define settings. But this is usually unnecessary unnecessary complexity. - teo van kot

1 answer 1

To display tables with some additional features, you can take a JqGrid. But as a rule, you can do with regular html elements just by defining the table element, buttons / links for deleting, adding, editing and setting javascript code that would do everything in Ajax mode.

  • Yes, you can simply with the table and buttons, but this is done if you know the structure of the table, what kind of columns are there, how many are there and what types, but I need all this to be done regardless of the structure of the datatable - Nakipatop
  • But is it possible for one data type to do one view, for another another, to know exactly which structure and accordingly create columns in the table? - antei23
  • then you can, but I want some kind of universal thing, if I don’t find anything, I’m going to have to do it - Nakipatop