Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Steve Boulay on Nov 13, 2009 07:20
open dhtmlx forum
grid xmlLoader with wml string

Hello,

I use to init my grid a xml string with configuration. I have two questions :

1. How can I have access to the xmlDoc generate after parse m xml string? before when i use an external xml, i can use mygrid.xmlLoader.xmlDoc.responseXML but when i use an xml string in my web page, it doesn't work.

2. In XML configuration we have two parts : BeforeInit and AfterInit but i'd like use sortRows command and i doesn't work in these parts.

Thanks
Answer posted by dhxSupport on Nov 16, 2009 07:55
1. There is no way to access to xmlDoc after calling parse() method
2. sorRows() method must be called only after all rows are loaded. You can attach "onXLE" event to the grid:
<call command="attachEvent"><param>onXLE</param><param>doOnXLE</param></call>
<script>
function doOnXLE(){
mygrid.sortRows(col, type, order);
}
</script>