URL cell formatting

I am using a trial PRO version of DHTMLXgrid.

The grid is populated using DHTMLXconnector.

I want to:

Make the values for a column hyperlinks that will open in the active window.

For example:

My grid has two columns: “Product ID” and “Product Name”.

The “Product ID” cell contains the value: 1234

I would like to have a hyperlink in the ProductID column like this: 1234

Any advice on how to do this with the grid and connector would be appreciated.

Thanks in advance.

You can use “link” excell type. Threat value as link source, renders as link (A tag)
The corresponding cell value in XML should be a “^” delimited list of following values:
1st - Link Text
2nd - URL (optional)
3rd - target (optional, default is _blank)

Dummy link
Real link^http://dhtmlx.com
Real link^http://dhtmlx.com^_blank

Real link^javascript:doSomething()^_self

Using dhtmlxConnectors’s event you can change responce from the server in the appropriate way (beforeRender - event occurs after data has been selected from the database but before its outputting to client, beforeProcessing - event occurs before beforeInsert, beforeUpdate, beforeDelete events occur. The beforeProcessing method occurs for all these operations. It can be cancelled in the same way as the aforementioned events)

Thanks for your reply.

I understand what you are saying because I have read the same information in the documentation.

However the documentation is not so good - There’s also a missing link for the different methods for client side components in the “beforeRender” section of the documentation  - (dhtmlx.com/docs/products/dht … 88cm84z4dd)

Please could you give a clear example as its not obvious how the beforeRender event gets a $column, or how how I can format the data to my requirements.

Thanks again. 

The server side code may look as

function custom_format($data){

Above code uses HTML tags for link formating, but if you are using link type for the column in grid, you can use more simple format described in previous post.

>>There’s also a missing link for the different methods for client side components in the "beforeRender"
Link will be fixed in nearest time, it must points to the next document
dhtmlx.com/docs/products/dhtmlxC … l#cc_api_a

>> how the beforeRender event gets a $column
custom function assigned to event receives data object ( basically it is wrapper around hash of values fetched for the row from DB ) , you can use get_value, set_value to change content for any column
The “ProductId” and “ProductName” names just an example, you need to use the same column names , as was specified in last parameter or render_table ( render_sql )

Perfect - Excellent support. Thanks again.