开发者

combobox select item

开发者 https://www.devze.com 2023-01-29 18:04 出处:网络
I have my 开发者_开发知识库combobox is filling from dgv on form load everything is ok, but i want to focus that value which i will provied.

I have my 开发者_开发知识库combobox is filling from dgv on form load everything is ok, but i want to focus that value which i will provied.

For example:

If my combobox contains 2 , 3 , 4, 5 when form load and combo box filling is end i want to first value was 4.

How i can do that?


Set the SelectedIndex property.


Using the SelectedValue property is probably better as it selected based on the value of the combo. SelectedIndex selects based on the Ordinal position instead of the actual value.

0

精彩评论

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