开发者

server validate RadComboBox with Load on demand with Custom text is true

开发者 https://www.devze.com 2023-02-08 07:22 出处:网络
How can I validate RadComboBox on the server side with LoadonDemand true and AllowCustomText is true? I have the following code but it doesn\'t validate correctly.

How can I validate RadComboBox on the server side with LoadonDemand true and AllowCustomText is true? I have the following code but it doesn't validate correctly.

  protected void RadComboBox1ServerValidate(object sender, ServerValidateEventArgs arg)
    {
        arg.IsValid = Rad开发者_JS百科ComboBox1.SelectedValue.Length > 0;
    }


Check the selected text or value of the combobox instead of its selectedvalue when using LOD.


In Combobox_SelectedIndexChange event, check RadComboBox if there is selectedValue > 0. If selected value > 0, then you must think that the custom text entered.

0

精彩评论

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