private void FillGrid(Book book) { string title = ((book.author != null) ? book.author : ""); title += (title != "") ? ((book.title != null) ? ", " + book.title : book.title) : book.title; string size = ((book.volume != null) ? book.volume : ""); size += (size != "") ? ((book.illustrs != null) ? ", " + book.illustrs : book.illustrs) : book.illustrs; size += (size != "") ? ((book.size != null) ? ", " + book.size : book.size) : book.size; string pub = ((book.placepub != null) ? book.placepub : ""); pub += (pub != "") ? ((book.pubhouse != null) ? ": " + book.pubhouse : book.pubhouse) : book.pubhouse; string note = ((book.note != null) ? book.note : ""); note += (note != "") ? ((book.notesp != null) ? ". " + book.notesp : book.notesp) : book.notesp; Docs.Invoke( (ThreadStart) delegate { Docs.Rows.Insert ( Docs.Rows.Count, new string[] { "", title, pub, book.dpublish, size, note, book.inv, book.cdc } ); }); autoinc(Docs); }