Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Darryl on Sep 02, 2009 10:29
open dhtmlx forum
new #select_filter with connector.js issue, when configuring grid from XML

Recently, I had issues getting the #select_filter to work, when using the connector.js file. 

After reading the knowledge base, I found out that a new version of connector.js was available, and that it fixed the issue.
It worked for me as well.

Since then, I have changed my grid.   It is no longer configured from javascript.  Instead, I am using a custom php script to generate xml which is then used to build the grid.
I am still using the server side Connector when updating my grid.

The grid display wonderfully, and I can edit fields, etc. 

However, the #select_filters in my header are all BLANK.

If I do not include the connector.js script,  the select filters work again.....   but of course I can't edit fields in the grid any more.

Suggestions?
Answer posted by dhxSupport on Sep 03, 2009 01:27
This issue was fixed but wasn't released yet. If this requirment is critical in your case please contact directly support@dhtmlx.com
Answer posted by Darryl on Sep 03, 2009 09:00
I don't mind waiting for the update.    I'm trying not to ask too many questions, because I'm still figuring out the product.   So far your help has been good.

Once I order the Pro version, I'll have a few more questions.

OK...  I do have one question:

What do you recommend as the best practice for managing multiple grids with different configurations?   
I currently use a custom php file to write the grid xml.  This includes configuring the columns, etc.
The same file also contains my code for updating the database and grid during grid-edits, etc..  This uses a custom query to update database, and then grid connector to let the client know that the update worked ($action->success() )
Then of course there is the .js client side stuff.  Mainly I use this for grid-events such as updating hidden (or read-only) cells, when the user edits another cell.

So if I want to make changes (ie add a new column)  to this grid, I have to:

a)   Edit the php which queries the database, and outputs xml to configure the grid and populate it with data. Make sure the query gets all the fields I need.
b)   Edit the xml output to ensure that all the columns have corresponding fields from the query, and that the columns are in the correct order
c)   Edit the fieldslist parameter sent to the gridconnector render_SQL function, to ensure that all the fields are in the correct order (must be same as in steps 1 and 2)
d)   Edit the query I use to update the database
e)   Edit the js if new events are required

The problem is that I'm constantly troubleshooting (mainly the updating of the grid/database) because there are so many steps to make small changes.   I'm pretty sure there is a better way.

I will have several grids in my application.  I am using php /mysql.   Any tips for managing multiple grids with different configs and data?