Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

OnFocus DrioDown in WebGrid, How?

Last post 09-09-2008 5:51 by smo. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-05-2008 7:27

    • smo
    • Not Ranked
    • Joined on 01-03-2008
    • Points 40

    OnFocus DrioDown in WebGrid, How?

     

    Hi

     How do I attach an OnFocus clientscript eventhandler to a dropdown in a WebGrid.... (.Type = ColumnType.DropDownList)

    TIA

     

    Søren

     

    • Post Points: 35
  • 09-05-2008 8:37 In reply to

    Re: OnFocus DrioDown in WebGrid, How?

     Hi,

     Currently there is no such Onfocus client side event handler, but I hope you can use ClientSideEvents-CellClickHandler. You could also take a look at the other client side event in the grid (or in the WebCombo component itself) , and see if any other event suits your needs.

    If none of the above helps, you could also submit a feature request , using the URL below:

    http://devcenter.infragistics.com/Protected/RequestFeature.aspx

    Thank you for the feedback.

     

    Angel 

    • Post Points: 5
  • 09-05-2008 10:45 In reply to

    Re: OnFocus DrioDown in WebGrid, How?

    You could try embedding a webcombo intead of setting the column type. That way, you could cast the webCombo as a WebControl and add the Attribute onFocus:

    WebControl web = (WebControl)WebCombo1;

    web.Attributes.Add("onfocus", "function()");

    This would call the function() when you enter editing the cell which has the WebCombo1 set as it's editorControl. I'm not sure if there's a workaround on this having the ColumType.DropDownList.

    "Programming is an art form that fights back" _ Se habla español.
    • Post Points: 20
  • 09-09-2008 5:51 In reply to

    • smo
    • Not Ranked
    • Joined on 01-03-2008
    • Points 40

    Re: OnFocus DrioDown in WebGrid, How?

     I've tried using the following piece of script code (see below) and that seems to work nicely in IE. In FireFox however the dropdown object doesn't seem to exists when the beforeentereditmode exists.... any suggenstions to how I get hold of the dropdown in FireFox?

    function cl_beforeentereditmode(gridid, cellid) {
        //Lets add a OnFocus handler to the DropDown in the cell, so we can set its item color
        var dropdown = ig_csom.getElementById(gridid + '_vl');
        if (dropdown!=null)
            ig_csom.addEventListener(dropdown, "focus", cl_dropdown_onfocus, true);       
      return false;
    }
     

    function cl_dropdown_onfocus() { //Lets set the color of each item in the DropDown
     
    // Do my stuff

    }

    TIA

     

    Søren

    • Post Points: 5
Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems