Hello,
I’m loading the data in a grid through an XML file. I’d like to set some rows in bold from the XML file, but it doesn’t work. I tried this in the XML file:
−<?xml version="1.0" encoding="UTF-8"?>
1
Play
…
Published on December 12 2007 at 6:30pm
…
[…]
I tried to put the head after and before all rows, afterInit and beforeInit,I still don’t have any row in bold.
I’m using the 1.5 version.
Thank you
Actually the XML which you provide must work correctly ( and it do so in my case )
Alternatively you can use
…
Thank you, changing the style works.
What does the function setRowTextBold do exactly; does it also change the css style of the row? I need to call setRowTextBold and setRowTextNormal on rows after loading the data as well.
I’d like to understand why afterInit does not work. I have a page with several tabs, all in Ajax. The grid is in one of the tabs,not in the active one. The grid seems to load the data when I click on the the tab that contains the grid. So I wonder if the issue is that afterInit is loaded after the initialization of the grid, not after the data are loaded.
Thank you
What does the function setRowTextBold do exactly; does it also change the css style of the row
Function change font-weight css style of cells in necessary rows, setRowTextNormal restore it to normal value ( both command will override settings which was set as row@style )
>>I’d like to understand why afterInit does not work.
commands from afterInit section called when data loaded and parsed, so it must not appear before data loading, and always appears after it. ( there is one limitation - distributed parsing mode, where commands may be executed in moment , when not all data loaded yet )
If problem still occurs - please provide grid initialization code ( because used XML is definitely correct )
Hello,
here is the initialization code:
Mygrid = new dhtmlXGridObject(‘gridbox’);
Mygrid.setImagePath(“grid/imgs/”);
Mygrid.setHeader(" , Date, Title,url",", ",“play,date,title,url”);
Mygrid.setInitWidths(“18,105,205,0”);
Mygrid.enableResizing(“false,true,true,false”);
Mygrid.setColAlign(“left,left,left,left”);
Mygrid.setColTypes(“ro,ro,ro,ro”);
Mygrid.enableMultiselect(false);
Mygrid.enableRowsHover(true,‘grid_hover’);
Mygrid.enableAlterCss(“even”,“uneven”);
Mygrid.enableBuffering(30);
Mygrid.preventIECaching(true);
Mygrid.init();
Mygrid.loadXML(“data.xml”);
Thank you
Problem caused by next line
>>Mygrid.enableBuffering(30);
without it command will work from XML. In current state command executed, but it may not affect row if its stored unparsed in buffer on moment of command call.
Hello,
I removed this line, but I get an error:
this.getRowById(row_id) has no properties
with this:
2
My grid does contain more then 5 rows. It looks like setRowTextBold is run before th grid is filled out.
Also, I’ve tried to use
Then, when I try Mygrid.SetRowTextNormal(2) or Mygrid.getRowById(2).style.fontWeight = “normal”; the style is not changed. However, if I try , Mygrid.getRowById(2).style.fontWeight = “bold”(or = “normal”), it does work. It looks like when I put the wight-font in the style, I cannot hange it throughh Javascript later.
Thank you