I search a way in extjs 4 to find grid columns dynamic, because i wrote a function to show errors in editor grid. In version 3 i've made it over
getColumnModel().findColumnIndex(cellname);
but column model no longer exists, does anybody has an idea?
Regards
I just had to work this out, @VoidMan was close. Need to specify the view though. For example:
If your column is configured with an itemId like this:
{
header: 'A Column',
dataIndex: 'data',
width: 70,
itemId: 'myColumnItemId'
}
You can call it like this:
grid.getView().getHeaderCt().child('#myColumnItemId')
This is something among these lines:
myGrid.headerCt.child('#column')
where #column its your column itemId. Note, use itemId and not id because columns are now Component and Component id must be unique across all your application.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With