Add new list/rows

Add new list/rows

criiss29criiss29 Posts: 2Questions: 0Answers: 0
edited December 2013 in General
Hi,

Im creating a table:

$(document).ready(function() {
$('#example').dataTable();
} );

Product | Status | Action

It works, but:

In the column 'Action' is a link Details

When I click on the link I need to add more rows of the product

How can I add more rows?

Thanks

Replies

  • xiaoyuandlgxiaoyuandlg Posts: 4Questions: 0Answers: 0
    Not knowing much about the JS code. But I get the C# of adding rows to table as reference:
    [code]
    ketticGridView.AddNewRows();
    ketticGridView.AddRows("New Row", 10.5, DateTime.Current, true);
    GridViewDataRowInformation rowInformation = new GridViewDataRowInformation(this.ketticGridView.MasterView);
    rowInformation.Cells[0].Value = "GridViewDataRowInformation";
    rowInformation.Cells[1].Value = 10.5;
    rowInformation.Cells[2].Value = DateTime.Now.AddDays(5);
    rowInformation.Cells[3].Value = true;
    ketticGridView.AddRows(rowInformation);
    [/code]

    http://www.kettic.com/winforms_ui/csharp_guide/gridview_row_insert.shtml
  • allanallan Posts: 63,700Questions: 1Answers: 10,501 Site admin
    @xiaoyuandlg - Thanks for the input. This isn't a C# forum though, so I'm not to sure how much C# code will be of use here.

    > How can I add more rows?

    Use fnAddData to add additional rows to a DataTable.

    Allan
This discussion has been closed.