HeaderColumn filter from codebehind

  1. #1

    HeaderColumn filter from codebehind

    Hi,

    I'm trying to accomplish creating a grid from an xml file. Succeeding quite well, but stuck with the creation of the preffered filter in the header column.

    I've created the header, created the filter (textboxes), but the problem lies in the listener:

    How can I create this from codebehind ?

    
    
    
    <ext:HeaderColumn Cls="x-small-editor">
        <Component>
            <ext:TextField ID="MerkTypeFilter" runat="server" EnableKeyEvents="true">
                <Listeners>
                     <KeyUp Handler="applyFilter();" Buffer="250" />
                </Listeners>
            </ext:TextField>
         </Component>
    </ext:HeaderColumn>
    I have this:

    
    
    
    TextField textf = new TextField();
    textf.ID = "MerkTypeFilter";
    textf.EnableKeyEvents = true;
    textf.AddListener("Keyup", "applyFilter()");
    textf.Width = 200
    But this doesn't work. Error: MerkTypeFilter is not defined in the "tfMerkType.on("keyup","applyFilter()")"
    Also..the width is still default...(so not 200px)

    Martin
  2. #2

    RE: HeaderColumn filter from codebehind

    Hi,

    1.
    textf.Listeners.KeyUp.Handler = "applyFilter();";
    2. Also..the
    width is still default...(so not 200px)

    Set AutoWidthElement="false" for the HeaderColumn

Similar Threads

  1. [CLOSED] HeaderColumn is not working
    By albayrak in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 05, 2011, 5:49 AM
  2. Replies: 3
    Last Post: Dec 10, 2010, 7:26 AM
  3. Replies: 2
    Last Post: Nov 12, 2010, 7:17 PM
  4. Replies: 3
    Last Post: Aug 15, 2009, 2:55 PM
  5. [CLOSED] Can't have two components in HeaderColumn
    By harafeh in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 3:30 PM

Posting Permissions