Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Akarsha Kumar on Jun 10, 2009 19:27
open dhtmlx forum
Disabling shortcut name in header text

I am trying to create an editable header as described in the "Implementing custom content in header|footer" section here: http://www.dhtmlx.com/docs/products/docsExplorer/index.shtml?node=dhtmlxgrid&type=smpl

I find that setting header values using custom shortcuts as shown below results in the shortcut name also being displayed in the header. ie. the header text shows up as "A{#editable}" instead of "A" :

dataGrid.setHeader("A{#editable}");
dataGrid.setColumnLabel( "A{#editable}");

Could someone guide me on how I can use custom shortcuts without having them displayed in the header title? Please note that this happens with both, custom and predefined shortcuts, such as text_search.
Answer posted by dhxSupport on Jun 11, 2009 03:39
To use custom shortcuts and native grid filtering you should include file dhtmlxgrid_filter.js
Answer posted by Akarsha Kumar on Jun 11, 2009 14:49
Thanks for the response. Including dhtmlxgrid_filter.js as you suggested does not resolve the issue.

Please note that the problem is NOT that custom shortcuts do not work. I have been able to make them work. The issue simply is that the shortcut name is being displayed as part of the header label. So, for instance, if have a single column in my grid, and place this call to set the column header name, along with its shortcut function name: dataGrid.setHeader("A{#editable}"); I then find that the column name is displayed as "A{#editable}" instead of "A". I'd like to know how I can prevent the "{#editable}" portion from being displayed.

Answer posted by dhxSupport on Jun 12, 2009 03:39
Please check if custom shortcuts definition placed before calling dataGrid.setHeader("A{#editable}"). Working sample will be send you by email
Answer posted by Akarsha Kumar on Jun 16, 2009 15:20
Thanks for the sample. I am now able to set the header title within the custom shortcut function using
tag.innerHTML=data[0];
Issue resolved. Thanks.