Click here to Skip to main content
15,880,132 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Add or Update Row In Data Table Pin
Richard Deeming25-Apr-17 12:48
mveRichard Deeming25-Apr-17 12:48 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois25-Apr-17 12:49
professionalKevin Marois25-Apr-17 12:49 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois26-Apr-17 8:01
professionalKevin Marois26-Apr-17 8:01 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming27-Apr-17 1:39
mveRichard Deeming27-Apr-17 1:39 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois28-Apr-17 7:21
professionalKevin Marois28-Apr-17 7:21 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming28-Apr-17 8:27
mveRichard Deeming28-Apr-17 8:27 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois1-May-17 6:55
professionalKevin Marois1-May-17 6:55 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming3-May-17 9:51
mveRichard Deeming3-May-17 9:51 
It looks close, but I think you'd end up losing the <span data-row-id="..."> on the new rows.

I'd be inclined to try to combine the two branches:
JavaScript
var $row = $(".webgrid-table").find("span[data-row-id='" + model.RowId + "']").closest("tr");

if (!$row.length) {
    var table = document.getElementById('divData');
    
    var len = table.rows.length;
    var new_row = table.rows[len - 1].cloneNode(true);
    new_row = table.appendChild(new_row);
    
    $row = $(new_row);
    $row.find("span[data-row-id]").data("rowId", model.RowId).text(model.RowId);
}

$row.find(".x-SiteId").text(model.SiteId);
$row.find(".x-InstrumentId").text(model.InstrumentId);
$row.find(".x-TowerLocation").text(model.TowerLocation);
$row.find(".x-BayLocation").text(model.BayLocation);
$row.find(".x-BaySerialNo").text(model.BaySerialNo);
$row.find(".x-BayStatus").text(model.BayStatus);
$row.find(".x-AccessionId").text(model.AccessionId);
$row.find(".x-Result").text(model.Result);
$row.find(".x-AssayName").text(model.AssayName);
$row.find(".x-Started").text(model.Started);
$row.find(".x-Completed").text(model.Completed);
$row.find(".x-TestSummary").text(model.TestSummary);




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois3-May-17 10:35
professionalKevin Marois3-May-17 10:35 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois3-May-17 10:37
professionalKevin Marois3-May-17 10:37 
QuestionMSChart load at Runtime raise error NullReferenceException System.Web.UI.DataVisualization.Charting.Axis.Resize Pin
lamiaa_moh23-Apr-17 2:06
lamiaa_moh23-Apr-17 2:06 
AnswerRe: MSChart load at Runtime raise error NullReferenceException System.Web.UI.DataVisualization.Charting.Axis.Resize Pin
Afzaal Ahmad Zeeshan23-Apr-17 2:33
professionalAfzaal Ahmad Zeeshan23-Apr-17 2:33 
Questionapprendre à coder facilement Pin
Member 1312801214-Apr-17 0:51
Member 1312801214-Apr-17 0:51 
AnswerRe: apprendre à coder facilement Pin
User 418025416-Apr-17 16:46
User 418025416-Apr-17 16:46 
Questioncookies not storing in login page why???showing NO cookies found Pin
LOKENDRA YADAV7-Apr-17 20:19
LOKENDRA YADAV7-Apr-17 20:19 
AnswerRe: cookies not storing in login page why???showing NO cookies found Pin
Richard Deeming10-Apr-17 7:41
mveRichard Deeming10-Apr-17 7:41 
QuestionShould i use bootstrap for my project? Pin
Member 131100775-Apr-17 23:37
Member 131100775-Apr-17 23:37 
AnswerRe: Should i use bootstrap for my project? Pin
Richard Deeming6-Apr-17 2:06
mveRichard Deeming6-Apr-17 2:06 
GeneralRe: Should i use bootstrap for my project? Pin
Member 131100776-Apr-17 7:35
Member 131100776-Apr-17 7:35 
GeneralRe: Should i use bootstrap for my project? Pin
Richard Deeming6-Apr-17 7:41
mveRichard Deeming6-Apr-17 7:41 
QuestionMVC PHP Pin
Member 115700245-Apr-17 22:51
Member 115700245-Apr-17 22:51 
AnswerRe: MVC PHP Pin
Jochen Arndt5-Apr-17 23:10
professionalJochen Arndt5-Apr-17 23:10 
AnswerRe: MVC PHP Pin
ZurdoDev6-Apr-17 2:05
professionalZurdoDev6-Apr-17 2:05 
Questionweb development MVC Codeignatir Pin
Member 115700245-Apr-17 22:49
Member 115700245-Apr-17 22:49 
AnswerRe: web development MVC Codeignatir Pin
ZurdoDev6-Apr-17 2:07
professionalZurdoDev6-Apr-17 2:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.