开发者

HOw to use SelectedValuePath to get the ID

I want to Get the Database ID of the item selectd in the Combo box in silverlight either by using SelectedValuePath or by any other wa开发者_StackOverflowy. Please suggest.


In XAML you must to write de name your Id in the combobox:

SelectedValuePath="ID"

where "ID" is the name of your field.

To get the selected value in c#:

int id=(int)myComboBox.SelectedValue;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜