Split on XML

Hi, i have a grid of 21 columns that is loaded through xml but if i try to run the mygrid.splitAt(1); after the grid has loaded then it produces an error. is there a way that i can state in the xml document that i want it to split at 1


you can use afterInit section in XML

    <row id=“1” … normal data here …

Hi Thanks for the quick response i have tested this and it works. i need to put a fake split in it as i had with the following code:


do i apply do this when adding the first column and how will i do this


The afterCall section can be used to call any method of grid, so basically you can set any mode from it ( the section may contain as many “call” tags as necessary )

I appreciate your answer and it does make alot of sense.

however i think you guys need to understand something: using this grid may be easy to you and although it is easy for the user your documentation is extremely limited

i have tried to do another call on a command as:


but this produces an error.

unless i have the correct documentation or you tell me what i need to put then there is absolutely no way of me knowing this

i think this is a vital point that you need to grasp, your documentation is extremely limited and it feels that because it is easy to you it is easy for everyone else, which is not the case

you need to provide better documentation or help more with your answers

please tell me how i do this


I realise that you have now finished for the night, i have a deadline for tomorrow and now i am going to hand this in which this functionality not working - i feel a little let down as in your answer all you needed to do was to give me one line of code that tells me how to do this, but instead your response said that i should really know how to do this for myself! how am i supposed to work this out when your documentation doesn’t tell me or you don’t tell me?


>>i have tried to do another call on a command as:

Actually the _fake._correctSplit is workaround proposed to achieve behavior necessary in your case, it never was purposed to public usage
There is no easy way to call such functionality from XML ( becase it not direct method of grid ), it can be resolved by extending grid in next way

grid = new …

and in XML


same approach can be used to add any other complex calls from XML

Hi This is not working, i have the following code attached to the grid:


and then in the head section in the xml doc i have the following:


please tell me what i am doing wrong


My last example was not fully correct
    _correctSplit method avaits integer value as incoming param, providing it as string will not cause direct error, but will not be processed correctly ( it can process value with “px” as well, but it is based on used doctype settings, values as integer will work for any mode )
Please try to use

tried this but it is not resulting in the fake split as it did it before this actually changes the size of the column itself whereas we are obviously setting the column size to 300 width and want a fake split of 1000 so that they can scroll horizontally

what is wrong?


The original code was a

mygrid.setColWidth(0,“1000px”); << change column width so, first column become a 1000px
mygrid._fake._correctSplit(300);  << move split zone so we have only 300px visible

If you execute only second command, and the width of column will not be greater than split width - scroll will not be active.
Sample sent by email.

Hi, yes sorry my mistake, its working great now!

i just have one more question in relation to this:

we have 20 columns in a treegrid and the first column is the tree - this is where we want the split at 1000 and the fake split at 300 which is what we now have working. however we also want the 2nd column to be frozen so that it doesnt move when the user scrolls horizontally along the other 18 columns. is this possible?

so essentially we think this is like having 2 splits, a split on the first column that has the fake split, but we also want the second column to be frozen as well.


Unfortunately this is not possible, only one split area per grid is possible.

so please help me with work around - need the tree column to obviously show all the data - not to have data going off the screen - and i need a split on column 2. please advice

This is one of the things, which really can’t be implemented. Without global changes in grid structure, which will affect most functionality , there is no way to achieve such effect.
The only thing which can be done, as far as I can see - two grids can be placed on same line, and onScroll events linked to sync current scroll state