สร้าง subcolums with C#.net for Pocket PC
ตอนนี้สร้าง colums ได้แล้วด้วย datagrid แต่ไม่สามารถสร้าง sub columns ได้ เช่น
NAME PRODUCT ProdA ProdB Dr.A XX XY Dr.B xy BN
คำถาม 1.อยากสร้าง columns ProdA,ProdB ภายใต้ columns PRODUCT ขอตัวอย่างหน่อย ตอนนี้ที่เขียนอยู่เป็นแบบนี้คะ
Store = new DataTable(); DataRowCollection rows = Store.Rows;
Store.Columns.Add(new DataColumn("Name", typeof(string))); Store.Columns.Add(new DataColumn("PRODUCT", typeof(string)));
DataRow newRow = Store.NewRow(); newRow[0] = strDocname; Store.Rows.Add(newRow); StoreView = new DataView(Store); myDatagrid.DataSource = StoreView;
|