Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Udaya on Jun 17, 2008 08:06
open dhtmlx forum
Multirow selection in smart rendering

Hi,
Iam using server side smart rendering.The rows get render properly,but iam geting a problem like,
when i select a row,it is geting highlighted and when i go select another row the previous row remains highlighted along with the current row. This is creating trouble when i want to select one particular row and do moveRowUp and moveRowDown functions.
Infact i even specified the following explicitly.

mygrid.enableMultiselect(false);

Still multiple selection is happening when i click the rows.Also this sort of multi selection happens only for the initial rendered rows (smart rendering)
My grid initialization is in this way,
        mygrid1 = new dhtmlXGridObject("gridbox");
        mygrid1.imgURL = "images/";
        mygrid1.setHeader("A,B");
        mygrid1.setInitWidthsP("50,50")
        mygrid1.setColAlign("center,center")
        mygrid1.setColTypes("ro,ro");
        mygrid1.setColSorting("str,str");
        mygrid1.enableTooltips("false");
        mygrid1.enableMultiselect(false);
        mygrid1.init();
        mygrid1.setSkin("xp");
        mygrid1.enableSmartRendering(true,24);
        mygrid1.enableMultiselect(false);

Regarding the smart rendering iam seting a limitation to fetch the number of rows each time in the query.So the 1st time it will render 24 rows and the next time it depends on how much the scroll bar moves and so on....

Kindly tell me where the problem is and what could be done??

With regards,
Udaya.R
Answer posted by Support on Jun 17, 2008 08:17
The initialization code is correct, and must not cause any issue.
Please check the XML which fetched from server, same error, as in your case, may occurs if loaded XML contains non unique IDs of rows ( or not contain them at all )
When loading data from XML , each row tag must have id attribute and its value must be unique.
Answer posted on Jun 17, 2008 20:53
Thank you.As you said,its working after i modified the XML to make the row id's unique.