Silverlight中的DataGrid繫結資料

2021-09-03 00:11:37 字數 780 閱讀 4981

首先寫乙個類:

public class employee

public string lastname

public decimal salary

public datetime startdate

public bool isvested

public string gender

}接著再寫乙個類,用於datagrid性別列的下拉框。

public class genders;}

}}加入乙個命名空間:

xmlns :local="clr-namespace:datagrid_cs"

然後宣告乙個屬性引用:

編寫datagrid**:

最後寫後台**:

public page()

);employeelist.add(new employee );

employeelist.add(new employee );

employeelist.add(new employee );

employeelist.add(new employee );

employeelist.add(new employee );

employeelist.add(new employee );

grddisplay.itemssource = employeelist;

private void combobox_loaded(object sender, system.windows.routedeventargs e)

Silverlight中的DataGrid繫結資料

首先寫乙個類 public class employee public string lastname public decimal salary public datetime startdate public bool isvested public string gender 接著再寫乙個類,...

Silverlight中的DataGrid繫結資料

首先寫乙個類 public class employee public string lastname public decimal salary public datetime startdate public bool isvested public string gender 接著再寫乙個類,...

oracle中timestamp轉成date型別

oracle中timestamp轉成date型別 由於要利用資料量比較大,利用spark在集群中進行表關聯並建立,並且需要進行時間的加減,所以建立出的表型別是timestamp型別 2017 10 03 09 40 06 000000 無意間看到一種方法,可以把timestamp型別,轉換為date...