Investigating Grid

We are evaluating grids to implement in our project

I’m trying to implement DHTMLX grid with below list of functionality
CRUD
Sorting
Filtering
Drag and drop

While implementing i’m face some issues, Please find the below issues

1)I’m using attachHeader() method to have a filter in my grid, it works fine. but the problem is, it always shows the filter text box in first line of grid. but i want to show the filter option only when the user clicks some button. i tried to set the filter property when some event gets fired but it’s not working.

is there any way to show and hide the filter text box which is inside grid?

  1. is there any way to clear the filter? I want to clear the each filter text box

  2. i implemented sorting functionality by using setColSorting() method, when i click the column name, it sorted as ascending and descending order. but i didn’t see any functionality to clear the sort

is there any functionality to clear the sort?

Please help me to resolve the all issues.

Dinesh

1)I’m using attachHeader() method to have a filter in my grid, it works fine. but the problem is, it always shows the filter text box in first line of grid. but i want to show the filter option only when the user clicks some button. i tried to set the filter property when some event gets fired but it’s not working.
The only solution is to replace the “#text_filter” text in your header with “” using the setColumnLabel() method:
docs.dhtmlx.com/api__dhtmlxgrid … label.html

  1. is there any way to clear the filter? I want to clear the each filter text box
    You may use the getFilterElement() method to operate with the filter input:
    myGrid.getFilterElement(col_ind).value="";

is there any functionality to clear the sort?
It is not available to reset the sorting state to the initial order of the rows. YOu may only reload the data of the grid.

Thanks for your quick reply. still i have few questions.

Please help

1)I used setColumnLable() method to set the filter to show the filter which i fire some events. but the problems is it always replaces the column header with filter. but i want to show the both. is there any way to do that?

2)when i use the #text_filter or other , it always filter based on “contains” criteria but i want to use “start from” criteria. is it possible to do in using attachHeader() method?

1)I used setColumnLable() method to set the filter to show the filter which i fire some events. but the problems is it always replaces the column header with filter. but i want to show the both. is there any way to do that?
If you call the attachHeader() method after the grid is initialized you also need to call the setSizes() method, to update the grid view.

2)when i use the #text_filter or other , it always filter based on “contains” criteria but i want to use “start from” criteria. is it possible to do in using attachHeader() method?
You may redefine the logic of the in-built filters or create your own one. Here you can find a tutorial:
docs.dhtmlx.com/grid__filtering … ilterlogic

Hi,

I’m trying to use combo in grid, i set the coltype as “combo”. but i’m not able to add a value in combo box.

i tried below two ways

  1. this.myCombo = this.grid.getColumnCombo(“1”);
    this.myCombo.addOption(“1”,“one”);

i can see the combo type in respective column but i’m not able to see the value which i added through addOption method

  1. this.myCombo = this.grid.getColumnCombo(“1”);
    this.myCombo.enableFilteringMode(true);
    this.myCombo.load("…/…/…/assets/data.xml");

i tried to load from xml also but still combo does not have any values
Please find the below xml format which i loaded through load method

<?xml version="1.0" ?> one two three four five six seven eight nine ten

coro type is working fine for me but combo is not working

Thanks in advance

Unfortunately the problem cannot be reconstructed locally. Please, make sure that you’re loading the data to the combo before the loading data to the grid.
If the problem still occurs for you please, provide a complete demo, or a demo link, where the problem can be reconstructed locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxi … pport.html

I’m explaining the issue more clear below

myGrid = new dhtmlXGridObject(‘gridbox’);
myGrid.setHeader(“Sales,Book Title”);
myGrid.setColTypes(“dyn,combo”);
myGrid.setColSorting(“int,str”);
myGrid.enableMultiselect(true);
myGrid.init();

I have created grid object with all properties, this grid contains two column, one is dyn type and another one is combo type. Please tell me the way to add values in combo box, i tried below ways but its not working

this.myCombo = this.grid.getColumnCombo(1);
this.myCombo.addOption([[1,“one”],[2,“two”]]);

when i click on combo box it shows empty

Please do needful

I attached sample with this, i created a grid object with two column, one is dyn and another one is combo types, i wan to know how to add list of values for combox box programatically. i tried some above ways but its not working

Please do needful
grid_Combox.zip (456 KB)

Please, try to add the options to your combo after the init of the grid:
myGrid.init();
this.myCombo = myGrid.getColumnCombo(1);
this.myCombo.addOption([[1,“one”],[2,“two”]]);

I’m investigating about dhtmlx grid, we’re using dhtmlx suite library for grid but its size is more than 4 mb, i tried to reduce the size but i can’t. i want to reduce the size of the library.
is there any way to reduce the library size by myself or will you be able to provide library for only grid which size is less than that.

we want to use only grid

Please guide

You may download just the dhtmlxGrid sources from the downloading page:
dhtmlx.com/docs/products/dhtmlxGrid/