-
6 Oct 2011 3:51 PM #11
Hi Darkwolfe,
Thank you very much for your help.
1)
Works, but I noticed another problem after that, when I edit a branch, after validating, it steps directly to the next branch (in edit mode) and not to the node (leaf in my case, see pictures below) just below.You can disable the toggle by adding a beforedblclick event listener and returning false. Since the editing events are tied to the tree body and not the panel body, this will not affect editing or events associated with editing.
Can I fix that, or at least can I prevent the fact that it goes to the next branch in editing mode.
In other words : I want only to edit the cell that I want and after editing I don't want that to step into another cells.
2)
Wait for your answer thank you very much.The editor is positioned at the top left of the cell. When I created this i didn't take into account form elements like checkboxes so it handles all them the same in terms of editor position. I'll need to add some code to check for form element type before positioning the editor. I'll put this into the next update.
May be, meanwhile, could you tell me in which line of the code this is managed.
3)
Sure, have a look to the two pictures joined.I haven't noticed this. Can you provide a screenshot so i know what to look for?
4)
Thank you, it was just for information, don't bother.I don't know how a checkcolumn model could be added. Ext was a little misleading calling the TreeGrid a grid, when it is more like a TreeListView. The columns are borrowed from the ListView, which in turn is loosely borrowed from the Grid, however, with a ListView, and consequently with the TreeGrid, no column model is actually used, so i'm not sure how you could get that in there. I'll take a look at it when i can, i should be able to mimic that functionality.
I think that the boolean column will satisfy me need.
5) Another point that I forgot to mentionned, as you will see in the pictures, when I have a null value, this "null" value is displayed as "null", and before that I used a classic grid, and the "null" value was not displayed but it was empty.
How can I manage to avoid the displaying of "null" ?
-
7 Oct 2011 12:50 PM #12
No problem, i hope you find my answers useful.
This function is by design. The editor will move to the nextSibling on enter. If you would like to change this behavior, look at the onEditorKey function that begins on line 811. The line you want to alter will be line 831.
You'll want to look at the getCellEditor function that starts on line 617. This creates an instance of Ext.grid.GridEditor, which is an extension of the Ext.Editor class. Look in the ext api for config options, but I would start with the alignment config option. Without any testing, i am about 90% sure that'll do the trick.
I see your screenshot, but i'm still not quite sure what you mean. To me, it looks like a normal column. What am i missing? I didn't alter any code relating to the headers, so this must be present on the Ext.tree.TreeGrid. I'll see if I can fix it, and create an override for the standard tree grid if necessary, once I'm more clear of the problem. If it's obvious, sorry i'm being so thick.
Well, i'm glad you can get around it, but i like the idea, so i'll still keep it in mind.
I made no alterations of the code that displays the values in the tree, so i'm not 100% on this one. I would start by looking at the Ext.ux.tree.TreeGridNodeUI class and overriding the renderElements functions. I would guess that the first for loop that sets up the column/node html element is the place to look. If you haven't figured it out by the time i can get to this, i'll take a look. i agree, though, "null", null, and possibly undefined should be parsed out.
-
8 Oct 2011 1:43 PM #13
Hi Darkwolfe,
First of all, again, thank you for your help, your answers are very useful.
1)
I will have a look and try to modify the code in order to fit it with my needs.This function is by design. The editor will move to the nextSibling on enter. If you would like to change this behavior, look at the onEditorKey function that begins on line 811. The line you want to alter will be line 831.
2)
I will try too, I will let you now the results.You'll want to look at the getCellEditor function that starts on line 617. This creates an instance of Ext.grid.GridEditor, which is an extension of the Ext.Editor class. Look in the ext api for config options, but I would start with the alignment config option. Without any testing, i am about 90% sure that'll do the trick.
3)
May be you missed the point.I see your screenshot, but i'm still not quite sure what you mean. To me, it looks like a normal column. What am i missing? I didn't alter any code relating to the headers, so this must be present on the Ext.tree.TreeGrid. I'll see if I can fix it, and create an override for the standard tree grid if necessary, once I'm more clear of the problem. If it's obvious, sorry i'm being so thick.
If you have a look to the column header that I encircled in red, you will see that the background is not not properly displayed (in grey like the others header columns on the left).
And the problem occurs when these columns were masked at the beginning of the rendering, but when you scroll (horizontal scrollbar at the bottom of the grid), to display these columns, you will get the problems.
After you answer, I made the test with a simple grid, and we don't have this problem.
4)
I made no alterations of the code that displays the values in the tree, so i'm not 100% on this one. I would start by looking at the Ext.ux.tree.TreeGridNodeUI class and overriding the renderElements functions. I would guess that the first for loop that sets up the column/node html element is the place to look. If you haven't figured it out by the time i can get to this, i'll take a look. i agree, though, "null", null, and possibly undefined should be parsed out.[/QUOTE]
Thanks, by my side, meanwhile I will try to solve the problem at the source (server side) to avoid these "null" values.
-
9 Oct 2011 3:34 PM #14
Hi Darkwolfe,
I noticed another point : When I edit a cell, and I scroll horizontaly (a treegrid with a horizontal scrolbar), the edit cell doesn't follow the column.
It stays on place as if it was positionned in a absolute way.
-
10 Oct 2011 8:02 AM #15
-
10 Oct 2011 8:03 AM #16
-
10 Oct 2011 9:31 AM #17
Thanks,
Great ! When do you think it will be available/released ?Yeah, i noticed this too. In the newest update (v1.0.6), the editor will cancel when scrolling occurs.
And what about not cancelling the editor if scrolling occurs ? Is it possible to manage the editor with the scrolling (following the scrolling) ?
-
21 Oct 2011 9:47 AM #18
Well, before i updated it to cancel the editing when scrolling, the editor, in my browser at least, was following the scroll. It didn't think it looked good to do that, so i made it cancel the editing on scroll.
Also, don't forget to grab the latest copy from the main post (v1.0.7), there is a major bug fix that prevented editing in IE.
-
12 Nov 2011 10:08 AM #19
hi,
First, thank you for this amazing work!
i have the same issus, like nordine.
please take a look at the screenshots.Originally Posted by nordine
3) I noticed that if some columns are not displayed because of the width of the container, and if I scroll to the right, then the header of these columns are not well displayed.
i think this is a problem of the grid container.
thank you by adcance.
-
18 Nov 2011 8:25 AM #20
hi darkwolfe
i see that if a vertical scroller apear, the horizontal one apears too (even if there is no node in the treegrid). i think it's because when the vertical scroller apears, we don't subtract it's height to the height of the treegrid's innerBody. i resolved the issu by overriting the onResize methode.
i don't know if this is the better way to do that. so say me what do you think about it!PHP Code:bd.style.height = this.body.getHeight(true) - hd.offsetHeight-Ext.getScrollBarWidth()+ 'px';
thanks


Reply With Quote