Some questions to DTHMLXGrid

Hello,

Sorry, If my English is not correct and you find some mistake in my Enlish. It’s not my navtive language and I only had some years in shool-english and no life-time-practice with it. I hope you can understand it.

I use DHTMLXGrid pro and DHTMLXConnector for PHP to show recordsets from a MSSQL-database. This is nearly working. But I have a small problem and some questions:

1.)
If I click in a header of a column, it’s sorted, but there is no sorting arrow (in IE8 there is the Red X placeholder) and the headers of the grid seem to have a standard style. The context menue I use, has the skyblue style and differs optically in style. Maybe I use a wrong order of CSS/Scripts or syntax. I hope you can see the mistake in my HTML File below.

2.)
When the page is shown for the first time, the rows are grouped by the first column. After sorting or filtering, the rows are not grouped anymore. I want that the rows stay grouped, no matter if sorted or filtered. How to do that? The events “onFilterEnd” and “onAfterSorting” seem not to fit.

3.)
I added a context menu to the grid. Is it possible to mark the whole row, where the mouse has been right-clicked before the context menue is shown? And is there an easier way to extract the value of the first column of the right-clicked row?

Here is my HTML:

[code]

DHTML Test
[/code]

Thanks for any hints. :slight_smile:

I got the image-problem fixed, but the 2 questions according grouping after sorting/filtering and marking row on rightclick with using contextmenu are still alive.

Any advice would be nice.

bump

Questions still alive…

2.)
When the page is shown for the first time, the rows are grouped by the first column. After sorting or filtering, the rows are not grouped anymore. I want that the rows stay grouped, no matter if sorted or filtered. How to do that? The events “onFilterEnd” and “onAfterSorting” seem not to fit.

Unfortunately the issue cannot be reconstructed. What version of dhtmlxGrid do you have?
If it’s less thatn 3.0 try to update it

3.)
I added a context menu to the grid. Is it possible to mark the whole row, where the mouse has been right-clicked before the context menue is shown? And is there an easier way to extract the value of the first column of the right-clicked row?

Try to add this custom function:

function my_pre_func(rowId,celInd,grid){
		  rInd = RKAGrid.getRowIndex(rowId);
		  RKAGrid.selectRow(rInd, true);
return true
}

RKAGrid.attachEvent(“onBeforeContextMenu”,my_pre_func);

Please excuse my late reply, but I was on vacation for a longer time.

2.)

I use dhtmlxGrid v.3.0 Professional edition build 110713.

The grouping is lost, after applying a sort or a filter. But grouping stays, if paging is used without sorting or filtering. The XML gerenated by the connector only contains 4 columns of string:
Column 1: string like “RKA0001000”, “RKA0001001”,“RKA0001002”,…
Column 2: string contains name of the client like “MUSTERFIRMA”,…
Column 3: string contains employee-number with variable length like “012”,“01234” or “1234567890” (depending on default length of the client in column 2)
Column 4: always empty, currently unused

Here is a Snippet from the genreated XML:

<rows total_count="450"> <row id="1314782306x0"> <cell>RKA0001545</cell> <cell>MUSTERFIRMA</cell> <cell>34567</cell> <cell></cell> </row> <row id="1314782306x1"> <cell>RKA0001557</cell> <cell>MUSTERFIRMA</cell> <cell>45678</cell> <cell></cell> </row> <row id="1314782306x2"> <cell>RKA0001561</cell> <cell>MUSTERFIRMA</cell> <cell>45678</cell> <cell></cell> </row> [...] </rows>
Maybe you can reconstruct it now?

3.)

That works great. Thanks

  1. Can you please create complete demo of the issue and open ticket at support.dhtmlx.com/ ?