Issues with tree grid

QuestionsIssues with tree grid
Quang Hoang asked 4 years ago

Hi there,

I am working a tree grid and found some issues as follow.

  1. The auto-pagination with the scroll option doesn’t work with the tree grid. The grid is working fine at the first page, but shows blank table while I am scrolling to the next page.
  2. So, I switch to manual-pagination with the pgbuttons option, but the pagination buttons don’t show up.
  3. I tried to load all rows (about 1000 rows) to the grid, it works, but very slow when I start searching on filters. For every character I type, take 1-2 seconds to reload the whole grid. I don’t know if there is a way to turn off the search on server side to search totally on client side.
  4. So, I tried to limit to 100 rows per page, the grid is working fine, but it isn’t able to search into child rows. I turned the debug mode on to see how the library generates the query, I found that it always includes the condition to only search on parent records only (parent_field IS NULL).
  5. Besides, it also have the issue with searching on id column with bigint data type in Postgres. I keep getting the error below. Looks like the library tries to convert the inputted values in filters to lower-case when generating the search query.

Detail: ERROR: function lower(bigint) does not exist LINE 1: … ) AS equipment WHERE 1=1 AND ( LOWER(“id”… ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Please advise, thank you in advance,

Quang


1 Answers
Abu Ghufran Staff answered 3 years ago

Hello,

Apologies for the late reply. Yes, your issues are valid and there are several limitations in using tree grid. We’ll be working to enhance it.

For big hierarical dataset, best solution could be to start with loaded:false option. It will make treegrid collapse by default and will send ajax call when you expand.

For small/medium dataset, you can keep loaded:true, and it will make treegrid expanded.

Currently local search is not supported with treegrid. One known point with server side searching is that when doing search, it will remove hierarchy because parent-child both may not be present in filtered column result.

About #5, Default autofilter search is contains search. And we make it case insensitive by converting to lower. You can replace contains search with equal search for your BIGINT field.
$col[“searchoptions”][“sopt”] = array(“eq”);

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

0 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?