jquery allows you to clone an element, optionally including data and events attached to it. optionally performing a deep copy for cloned elements
http://api.jquery.com/clone/
it would help if you added a class or id to your row(s) so you could select them
[code]
// clone first row in first table (if you used an id, you could select a particular table)
// append that cloned row to the same table
$('table:first').find('tr:first').clone(true).appendTo($('table:first'));
[/code]
(this is off the top of my head.. might need to be tested/debugged.. but the idea is there)
I did tried as advised, but didnt work.. Here is the actual table :
Select
Line Item
Profile #
Container Category
Weight
Wt. Unit
Volume
Vol Unit
Quantity
<% if (Model.ShipmentManifests.Count > 0)
if( Model.ShipmentManifests[0].ShipmentInformationLineItems.Count > 0)
{
for (int i = 0; i < Model.ShipmentManifests[0].ShipmentInformationLineItems.Count; i++)
{%>
<%= Html.CheckBox("chkBxLineItemSelect", false, new { @value = "1-A"})%>
<%: Html.TextBoxFor(m => m.ShipmentManifests[0].ShipmentInformationLineItems[i].LineId, new { style = "width: 70px" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].WasteProfileId, ViewData["ProfileNumbers"] as IEnumerable, new { id = "profileNum" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerCategory, ViewData["ContainerCategories"] as IEnumerable, new { id = "ddlContainerCategories" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerWeightUnits, ViewData["WeightTypes"] as IEnumerable, new { id = "weightType" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerVolumeUnits, ViewData["VolumeTypes"] as IEnumerable, new { id = "volumeType" })%>
Replies
ID
Company>
Html.TextBoxFor( m => m.id)
Html.DropDownList("ddlMyList",ViewData("Companies") as IEnurable, new { Style = "width : 30" } )
http://api.jquery.com/clone/
it would help if you added a class or id to your row(s) so you could select them
[code]
// clone first row in first table (if you used an id, you could select a particular table)
// append that cloned row to the same table
$('table:first').find('tr:first').clone(true).appendTo($('table:first'));
[/code]
(this is off the top of my head.. might need to be tested/debugged.. but the idea is there)
Select
Line Item
Profile #
Container Category
Weight
Wt. Unit
Volume
Vol Unit
Quantity
<% if (Model.ShipmentManifests.Count > 0)
if( Model.ShipmentManifests[0].ShipmentInformationLineItems.Count > 0)
{
for (int i = 0; i < Model.ShipmentManifests[0].ShipmentInformationLineItems.Count; i++)
{%>
<%= Html.CheckBox("chkBxLineItemSelect", false, new { @value = "1-A"})%>
<%: Html.TextBoxFor(m => m.ShipmentManifests[0].ShipmentInformationLineItems[i].LineId, new { style = "width: 70px" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].WasteProfileId, ViewData["ProfileNumbers"] as IEnumerable, new { id = "profileNum" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerCategory, ViewData["ContainerCategories"] as IEnumerable, new { id = "ddlContainerCategories" })%>
<%: Html.TextBoxFor(m => m.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerWeight, new { style = "width: 70px" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerWeightUnits, ViewData["WeightTypes"] as IEnumerable, new { id = "weightType" })%>
<%: Html.TextBoxFor(m => m.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerVolume, new { style = "width: 70px" })%>
<%: Html.DropDownListFor(model => model.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerVolumeUnits, ViewData["VolumeTypes"] as IEnumerable, new { id = "volumeType" })%>
<%: Html.TextBoxFor(m => m.ShipmentManifests[0].ShipmentInformationLineItems[i].ContainerQuantity)%>
<%}
} %>