setRowTextBold after loading XML data


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"?>



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 )

here is the initialization code:

Mygrid = new dhtmlXGridObject(‘gridbox’);
Mygrid.setHeader(" , Date, Title,url",", ",“play,date,title,url”);

Thank you

Problem caused by next line
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.

I removed this line, but I get an error:
this.getRowById(row_id) has no properties
with this:

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