[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...
Code:
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...
Code:
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...
Code:
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);")
)
)