µ¥ÀÌÅͱ׸®µå ¿ÀºêÁ§Æ®ÀÇ µ¥ÀÌÅÍ °ªÀ» data_tableÀ» »ç¿ëÇÑ´Ù.
void @DataGridSetDataTable(string class_name, object data_table);
ÇÔ¼öÀÎÀÚ
string class_name : µ¥ÀÌÅͱ׸®µå ¿ÀºêÁ§Æ®ÀÇ Å¬·¡½º À̸§
object data_table : »ç¿ëÇÒ data_table
¹Ýȯ °ª
¾øÀ½
¿¹Á¦
connection_id = @ProxyMongoOpen("mongodb://192.168.1.148", "test");
if(connection_id == -1)
{
@Message("Error. connection_id ==
-1");
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 = @DataTableGetRowData(dt, "PersonDate", 0);
string id = @DataTableGetRowData(dt, "_id", 0);
@sprintf(text,
"Count=%d _id=%s, PersonDate=%s", count, id, data);
@Message(text);
}
else {
@sprintf(text, "Count=%d",
count);
@Message(text);
}
@DataGridSetDataTable("DataGrid1", dt);
@DataGridReLoad("DataGrid1");
¹®Àå¼³¸í : µ¥ÀÌÅͱ׸®µå ¿ÀºêÁ§Æ® 'DataGrid1'ÀÇ µ¥ÀÌÅÍ·Î dt¸¦ »ç¿ëÇÑ´Ù.
¹öÀüÁ¤º¸
ÃÖÃÊÁö¿ø:
°ü·ÃÇ׸ñ
@DataGridComboBoxColumnItemAdd()