DataGridSetDataTable

 

Use data_table for the data value of the DataGrid object.

 

void @DataGridSetDataTable(string class_name, object data_table);

 

Parameters

string class_name: Class name of DataGrid object

object data_table: data_table to use

 

Return Value

None

 

example

connection_id = @ProxyMongoOpen("mongodb://192.168.1.148", "test");
if(connection_id == -1)
{
@Message ("Error. Connection_id == -One");
return;
}

string text;
@sprintf(text, "{PersonCount:50}");
string sort;
@sprintf(sort, "{_id:1}");

object dt;
dt = @ProxyMongoFill(connection_id, "things", text, sort);
@ProxyMongoClose(connection_id);

if(dt == null)
{
@MessageBox (@getlasterror (), "Mongofill Error", MB_OK);
return;
}

int count;
count = @DataTableGetRowCount(dt);

if(count > 0) {
String Data = @DatableGetrowdata (dt, "Persontate", 0);
String ID = @datableGetrowdata (dt, "_id", 0);
@sprintf (text, "Count =%d _id =%s, personate =%s", count, id, data);
@Message (text);
}
else {
@sprintf (Text, "Count =%D", Count);
@Message (text);
}

@DataGridSetDataTable("DataGrid1", dt);
@DataGridReLoad("DataGrid1");

 

Description: Use dt as a data from the DataGrid object 'DataGrid1'.

 

Version Information

Supported Version: 10.3.5

 

Related Helps

@DataGridAddButtonColumn()

@DataGridAddCheckBoxColumn()

@DataGridAddComboBoxColumn()

@DataGridAddRow()

@DataGridAddTextBoxColumn()

@DataGridClearColumn()

@DataGridComboBoxColumnItemAdd()

@DataGridDeleteRow()

@DataGridGetCellData()

@DataGridGetCellSel()

@DataGridGetColumnName()

@DataGridGetCurSel()

@DataGridGetRowCount()

@DataGridGetRowData()

@DataGridInsertRow()

@DataGridReLoad()

@DataGridSetCellBackColor()

@DataGridSetCellData()

@DataGridSetCellTextColor()

@DataGridSetColumnAlignment()

@DataGridSetColumnHeadersHeight()

@DataGridSetColumnIndex()

@DataGridSetColumnReadOnly()

@DataGridSetColumnText()

@DataGridSetColumnVisible()

@DataGridSetColumnWidth()

@DataGridSetCurSel()

@DataGridSetDataTable()

@DataGridSetDsn()

@DataGridSetRowData()

@DataGridSetRowHeight()

@DataGridSetSelect()