Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Anuj on Aug 22, 2008 00:53
open dhtmlx forum
Radio Button in Grid Where XML generate dynamicaly

My grid XML generate dynamically.

I want first column contain ratio button.

res += "<head> " +
"<column width='70' type='ra' align='left' >Select Flight</column>"+
" <column width='100' type='ro' align='center' color='#d5f1ff' sort='str'>Flight No</column> " +
" <column width='100' type='ro' align='center' >Airways</column> " +
" <column width='100' type='ro' align='center' >Source</column> " +
" <column width='100' type='ro' align='center' >Destination</column> " +
" <column width='100' type='ro' align='center' sort='str' >Departure Time</column> " +
" <column width='100' type='ro' align='center' sort='str'>Arrival Time</column> " +
" <column width='100' type='ro' align='left' > Via </column> " +
" <column width='50' type='ro' align='center' >Stops</column> " +
" <column width='150' type='ro' align='left' >Aircraft Type</column> " +
" <settings> " +
" <colwidth>px</colwidth> " +
" </settings> " +
" </head> ";



and

res += "<row>";
res += "<cell></cell>"; // For Radio button
foreach (XmlElement param in xmlDoc.GetElementsByTagName("param"))
{

if (param.Attributes["name"].Value == "AirwaysCode")
{
switch (drTrain[param.Attributes["name"].Value].ToString().Trim())
{
case "DN":


res += "<cell><![CDATA[ <img src='../Images/TripPlanner/Flight/dn_airline.gif'> ]]></cell>";
break;
case "S2":
res += "<cell><![CDATA[ <img src='../Images/TripPlanner/Flight/s2_airline.gif'> ]]></cell>";
break;
case "9W":
res += "<cell><![CDATA[ <img src='../Images/TripPlanner/Flight/9w_airline.gif'/> ]]></cell>";
break;
case "AI":
res += "<cell><![CDATA[ <img src='../Images/TripPlanner/Flight/ai_airline.gif'/> ]]></cell>";
break;
case "IT":
res += "<cell><![CDATA[ <img src='../Images/TripPlanner/Flight/it_airline.gif'/> ]]></cell>";
break;


}
}
else
{
res += "<cell >" + drTrain[param.Attributes["name"].Value].ToString() + "</cell>";
}
}
res += "</row>";
}

}
return res;


but they don't display radio button

Answer posted on Aug 22, 2008 01:41
The same code works correctly in case of local samples ( attached )
Please be sure that you set correct image path ( grid.setImagePath ) , because it may affect radion button rendering. 

By the way, row tag must have id attribute 
Attachments (1)