A Simple Editable Grid in COM API ASP

Less than one minute read time.
This article covers the creation of an editable grid. By this I mean the presentation of data in a spreadsheet like structure, each row in the grid a separate record and each column a separate field.

The code sample below is very simple and should only be considered a rough outline of how such a grid can be developed. But I hope this may be useful.


','comp_primaryuserid='+myRecordId);
//
var myBlockContainer = CRM.GetBlock('container');
var ContentBlock = CRM.GetBlock('content');
myBlockContainer.AddBlock(ContentBlock);
myBlockContainer.DisplayButton(Button_Default) = false;
myBlockContainer.DisplayForm = false;
//
myRecord.OrderBy = 'comp_companyid' //ASC and DESC can be used.
ContentBlock.contents = "";
var rowflag = 1
var rowclass
while (!myRecord.eof) //eof checks for end of data and instantiates query
{
if (rowflag == 1)
{
rowclass = "row1";
rowflag = 2;
}
else
{
rowclass = "row2";
rowflag = 1;
}
ContentBlock.contents += '';
//
Company Name
myRecord.NextRecord(); } ContentBlock.contents += ""; CRM.AddContent(myBlockContainer.Execute()); Response.Write(CRM.GetPage()); %>