填充Combobox(数据绑定)从呼叫无效

时间:2014-03-17 09:21:23

标签: c# winforms combobox

我有一个组合框,其中包含7个处理程序列表'来自数据绑定(本地SQL服务器数据库)。

我试图通过调用将值传递给它,但是当我运行代码时,显示的值始终是处理程序列表中的第一个值。例如我将通过处理程序4'在我的电话中,但处理程序1'将填充。

我已尝试填充' .Text',' .SelectedText'并使用值而不是字符串,' .SelectedValue',无济于事。这里有什么帮助吗?

public partial class Start_Form : ICallFormBase
{
    public Start_Form()
    {

    }
    public Start_Form(Call call)
        : base(call)
    {
        InitializeComponent();
        Notes_text.Text = Call.Notes;
        if (call.Id > 0)
        {
            Handler.SelectedValue = Call.BeginAudit.Handlerstore;
            Audit_Date.Value = Call.BeginAudit.Auditdatestore;
            Auditor.SelectedValue = Call.BeginAudit.Auditorstore;
            ClaimRef.Text = Call.BeginAudit.Claimrefstore;
            Notes_text.Text = call.Notes;
        }
    }
}

0 个答案:

没有答案