jquery - How to add button at the end of each column in datatable in MVC 4? -


i new concept. want add button @ end of each column in datatable.

i can in asp.net, not have idea in mvc 4.

please advise me on issue.

code below:

<table class="plans-table">         <thead>         <tr>                                     @foreach (datacolumn col in table.columns)             {                 <th>(@col.columnname)</th>             }         </tr>     </thead>     <tbody>         @foreach (datarow row in table.rows)         {         <tr class="plans-row">             @foreach (datacolumn col in table.columns)             {                 <td>                     @row[col.columnname]                 </td>              }         </tr>         }     </tbody> </table> 

you can add button @ end of each row, like:

<table class="plans-table">         <thead>         <tr>                                     @foreach (datacolumn col in table.columns)             {                 <th>(@col.columnname)</th>             }             <th>options</th>         </tr>     </thead>     <tbody>         @foreach (datarow row in table.rows)         {         <tr class="plans-row">             @foreach (datacolumn col in table.columns)             {                 <td>                     @row[col.columnname]                 </td>              }             <td><input type="button" value="click me!" name="rowbutton"/></td>         </tr>         }     </tbody> </table> 

as mvc differs asp.net in structure, note normal html button. such, need use javascript perform postbacks or other operations.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -