动态添加的AjaxControlToolkit.ComboBox Textchanged事件未触发

时间:2019-12-15 08:55:52

标签: c# asp.net gridview ajaxcontroltoolkit textchanged

我有一个GridView,里面装有AjaxControlToolkit.ComboBox控件。

我需要能够在该字段中键入内容,然后按Enter键,然后触发一个事件。目前,我只能在SelectedIndexChanged上触发一个事件。香港专业教育学院尝试了一些事情,请参阅下文。 (这是将AjaxControlToolkit.ComboBox添加到GridView的代码)

                ddl.Visible = true;
                ddl.ID = "textbox_row_" + temp_row_one_index + "_Cell_" + i + "_";
                TableCell cell = new TableCell();
                row1.Cells.Add(cell);
                if (text == " ")
                {
                    text = "";
                }
                ddl.Text = text;
                ddl.Width = 100;
                //   ddl.TextChanged
                ddl.AutoCompleteMode = AjaxControlToolkit.ComboBoxAutoCompleteMode.Append;
                ddl.Items.Add("test1");
                ddl.Items.Add("test2");
                ddl.Attributes.Add("readonly", "false");
                ddl.Attributes.Add("onChanged", "testing(); ");
                ddl.Attributes.Add("onBlur", "testing(); ");
                ddl.TextChanged += new EventHandler(testing());
                ddl.AutoPostBack = true;
                ddl.TabIndex = tabindex;
                tb.EnableViewState = true;
                UpdatePanel up = new UpdatePanel();
                up.ContentTemplateContainer.Controls.Add(ddl);
                row1.Cells[i].Controls.Add(up);

任何帮助将不胜感激。 :)

0 个答案:

没有答案