我正在使用 Ext.Net1.0。我正在使用组合框..当我通过一些计算从组合框中选择值时,如果值已经使用,那么我想动态显示错误消息,那么我该如何显示消息..??
<ext:ComboBox ID="cmbClient" runat="server" Width="200"
FieldLabel="Client Name"
DisplayField="client_firstName" ValueField="clientId"
AllowBlank="false" BlankText="Select Client"
MsgTarget="Title" EmptyText="Select Client">
<Store>
<ext:Store runat="server" ID="clientStore">
<Reader>
<ext:JsonReader IDProperty="clientId">
<Fields>
<ext:RecordField Name="clientId" />
<ext:RecordField Name="client_firstName"/>
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="client_firstName" Direction="ASC" />
</ext:Store>
</Store>
<DirectEvents>
<Select OnEvent="cmbClient_Change"></Select>
</DirectEvents>
</ext:ComboBox>
cs页面代码
protected void cmbClient_Change(object sender, DirectEventArgs e)
{
int c = objapp.Count_SelectClient();
if (c != 0)
{
statusbar.Show();
this.statusbar.Text = cmbClient.SelectedItem.Text + " already having appoinment at selected time.";
this.statusbar.Icon = Icon.Exclamation;
}
}
在这里而不是在状态栏中显示错误消息我想在组合框中显示错误消息..那我该怎么办?