[CLOSED] Get Reference to Grids ComponentColumn's Control in javascript

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Get Reference to Grids ComponentColumn's Control in javascript

    Hello,
    I have an Ext.Net.GridPanel which contains an Ext.Net.ComponentColumn which contains an Ext.Net.TextField.

    You will notice that in the View, the Ext.Net.TextField has a listener for the Change event which does not take any parameters ( such as "this" ) as follows...

    l.Change.Fn = "FilterValueHandling";
    In the Javascript, the signature of "FilterValueHandling" has an argument which takes a reference to the Ext.Net.TextField and looks like this...

    function FilterValueHandling ( reference )
    {
    ...
    }
    From another Javascript method, I need to call "FilterValueHandling" to update. I make this call with a reference to the "TextField" object and it does not work, but it works fine when i type in the TextField and it fires the event.

    How can i get the proper reference to pass to the "FilterValueHandling" function? The sample code for the view is below...

    X.GridPanel ( )
    	.ItemID ( "TabFilterCriteria" )
    	.SortableColumns ( false )   
    	.EnableColumnHide ( false )
    	.EnableColumnMove ( false )
    	.TabConfig
    	(
    		X.Button()
    			.ToolTips 
    			(
    				this.Model.CreateToolTip ( "sstabFilters" , "Id_Filter", "Filter Criteria Tab" ) )    
    			) 
                .Store 
    			(
                    X.StoreFor<Linq.Entity.BrowserFilterSet> ( )
    					.AutoLoad ( true )
                        .PageSize ( 20 )
                        .DataSource ( Model.BrowserFilterSet )
                        .Reader 
    					( 
    						reader => reader.Add ( X.JsonReader ( ) )
                        )
                )
                .ColumnModel 
    			(
    				X.ComponentColumn ( )
    					.Editor(true)
    					.Text ( "Value" )
    					.ItemID ( "ValueComponentColumn")
    					.DataIndex ( "Operand2DisplayValue" )
    					.Flex ( 1 )
    					.Component 
    					(
                            X.TextField ( )
    							.ItemID("ValueColumnOperand2Display")
    							.EnableKeyEvents ( true )
    							.Listeners 
    							(
    								l =>
    								{
    									l.SpecialKey.Fn = "FilterKeyHandling";
    									l.KeyUp.Fn = "FilterValueHandling";
    									l.Change.Fn = "FilterValueHandling";
    									l.Change.Delay = 10;
    								}
    							)
    					)
    					.Listeners(l => l.BeforeBind.Handler = "FixedFilter(e);")
    			)
    	)
    Last edited by edip; Jun 22, 2016 at 9:07 PM.

Similar Threads

  1. Replies: 4
    Last Post: May 12, 2016, 11:18 AM
  2. Replies: 1
    Last Post: Mar 24, 2015, 11:40 AM
  3. Replies: 0
    Last Post: Jan 30, 2014, 2:24 PM
  4. How to reference External Javascript Files????
    By healingnations in forum 1.x Help
    Replies: 1
    Last Post: Dec 07, 2011, 2:45 AM
  5. Two grids in a user control
    By KHafeez in forum 1.x Help
    Replies: 4
    Last Post: Jan 29, 2010, 6:36 AM

Posting Permissions