Silverlight: Default value in Combobox

后端 未结 3 733
名媛妹妹
名媛妹妹 2021-01-05 09:22

I would like to display a default text in the combobox. For example, \"Choose a person\" message. could you please help me out.

Please note that I am using databindi

3条回答
  •  心在旅途
    2021-01-05 09:40

    You can use set value method to insert a value at a particular position. It may be not best option but it works for me.

    var array= APPTasks.ListPhysician.OrderBy(e => e.phyFName).ThenBy(e => e.phyLName).ToArray();
    
    array.SetValue((new Physician { phyFName = "Select Attening Md", phyLName = "" }), 0);
    

    just bring your data in a variable and use SetValue method.

提交回复
热议问题