tags:

views:

484

answers:

2

Hi,

I am trying to show/load different editor on different rows of a editorgridpanel. Like a textbox on one row combobox/superboxselect on another and it could be any order, random. The conditions which dictate which editor will be shown reside in the database. Please tell me if this is possible and if so, how do i go about it.. I have tried pulling the conditions asynchronously which are pulled on a click event for the respective column, but calling it async causes problems. Please advise

A: 

Anything is possible, but what you want to do would take a bit of work. The basic idea would be to configure the needed grid editor(s) dynamically and update the columns with the new editors when needed. Now... what would be required to make that actually work I couldn't say offhand without digging into the Ext source -- it would almost definitely require overriding default behavior in the grid and/or column model.

Pulling your conditions asynchronously would (I imagine) be too slow for the interaction of clicking on a row to edit inline. If it takes a second or more from click to configured editors, that would not be acceptable performance. I would try to find a way to send your conditions down along with the other row data if at all possible (they can be in the store's data model on the client without having to be shown in the grid).

Without knowing more about your business requirements, it might be more appropriate to ditch the editable grid and instead go with a dynamically-configured FormPanel tied to the grid. This way the interaction of clicking and then pausing slightly while the form is configured would appear to be more natural. Also, the functionality of rendering a form with a particular configuration is perfectly standard and would require nothing fancy on your end. See this example as a starting point (your form would be dynamic, but maybe the same type of interaction could work?)

bmoeskau
Thanks for your reply, bmoeskauHaving a form panel with a grid would make things complicated for the user from a UI point of view.I have limited the async call to fetching only the data, now the conditions for determining the type of editor to use.. is done synchronously and its working fine for the time being.. On a side note I found this PropertyGrid http://www.extjs.com/deploy/dev/examples/grid/property-grid.html which displays different type of editors on one column.. but I would modify it to show more columns. Will try to see how flexible this type is when I get a similar requirement
Sloane
A: 

hi did U find a solution to your problem ? I also need the same functionality

//shanika

shanika