This is a migrated thread and some comments may be shown as answers.

RadComboBox in User Control: Deleting Text Doesn't Fire Text Changed Postback

5 Answers 120 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Oran
Top achievements
Rank 1
Oran asked on 09 Jan 2011, 06:41 PM
Hi,

I am using version 2009.2.826.35 and I am unable to update to the latest version at the moment. There is a bug in this version when the RadComboBox gets placed in a user control and it is set for Load On Demand.  Even though the RadComboBox has the AutoPostback set to true, the postback does NOT occur when the user highlights the text in the RadComboBox and clicks delete or backspace.

I have access to a later dll (2010.1.519.35) and I verified that this bug was fixed in this version. However, as I mentioned before, at the moment we don't want to update to the latest dll. Are there any other work arounds that can fix this bug?

Here is a link to a demo project that shows the bug (link expires on Jan 16 2011): Sample Project
Thanks,
Oran

5 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 10 Jan 2011, 11:31 AM
Hello Oran,

Thank you for providing a link to your sample project.

Yes, you can work around the bug by putting the following script on your page:
<script type="text/javascript">
    Telerik.Web.UI.RadComboBox.prototype._raiseClientBlur = function (c) {
        if (this._focused) {
            var d = this.get_tableElement();
            if (d != null) {
                d.className = "";
            } this.raise_onClientBlur(c);
        }
    };
 
    Telerik.Web.UI.RadComboBox.prototype._selectItemOnBlur = function (g) {
        if (this.get_emptyMessage() && (this.get_text() == this.get_emptyMessage())) {
            return;
        } var f = this._findItemToSelect();
        if (!f && (this.get_items().get_count() > 0) && !this.get_enableLoadOnDemand() && !this.get_allowCustomText()) {
            if (this.get_markFirstMatch()) {
                if (this.get_text() == "") {
                    this.set_text(this._originalText);
                } this.highlightMatches();
                this.selectText(0, 0);
                f = this.get_highlightedItem();
            }
        } if (this.get_filter() != Telerik.Web.UI.RadComboBoxFilter.None) {
            this.setAllItemsVisible(true);
        } if (!f) {
            var d = this.get_selectedItem();
            if (d) {
                if (this.raise_selectedIndexChanging(null, g) == true) {
                    this.set_text(d.get_text());
                    return;
                } d.set_selected(false);
                this.set_selectedItem(null);
                this.set_selectedIndex(null);
                this.raise_selectedIndexChanged(null, g);
                var c = { Command: "Select", Index: -1 };
                this.postback(c);
                return;
            }
        } this._performSelect(f, g);
    };
</script>

I hope this helps.

Kind regards,
Simon
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Oran
Top achievements
Rank 1
answered on 10 Jan 2011, 12:33 PM
Thank You Simon! It works.

Is there documentation for the Client Side API? It would be really helpful when trying to do more complicated tasks on the client side.

Oran
0
Simon
Telerik team
answered on 10 Jan 2011, 01:02 PM
Hello Oran,

Yes, below are the most important help topics about the client-side API of RadComboBox:
I hope this helps.

Greetings,
Simon
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Oran
Top achievements
Rank 1
answered on 10 Jan 2011, 01:09 PM
Simon,

I was hoping for a reference guide like there is for the server side code. I wanted to see things like how to force a postback through JS and showing every method that is available on each client object. I understand that for the average developer it might confuse them, but it would be helpful in certain scenarios.

Thanks,
Oran
0
Simon
Telerik team
answered on 10 Jan 2011, 01:24 PM
Hi Oran,

I understand what you mean, however our documentation currently covers each individual control separately. So in the same section you would find the API of any other control from the suite.

Here you can also find the documentation of the most commonly used global methods of our library.

I hope this helps.

Greetings,
Simon
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
ComboBox
Asked by
Oran
Top achievements
Rank 1
Answers by
Simon
Telerik team
Oran
Top achievements
Rank 1
Share this question
or