开发者

How Can I Choose Appropriate ComboBox Value Based on Select ListView Record? - C#.NET

http://img256.imageshack.us/img256/9417/snapshotapp.jpg http://img256.imageshack.us/img256/9417/snapshotapp.jpg

Contact Title has a default value which is Sales Person. Anyhow, when a user click Edit on the chosen ListView record, i need Contact Title to have the right value that corresponds to the chosen record. For example, if user clicks edit, the fields on the left side will be filled with values. In this case, i want Contact Title to view the right 开发者_运维问答value.

How can i do it?

I hope my question is clear enough.


After you've retrieved the text from the list just use it to find the correct record in the ComboBox as:

cbo.SelectedIndex = cbo.FindStringExact("Sales Person")
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜