how to apply images for radiobutton circle?
i have dynamicallt load the radio button inside the panel instead of circle radio button i want to apply images for that radio button circle......pls help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
varun dhanabalanPosted May 14, 2013, 9:06 AM
my code is below
//
int iCnt = myDS_Comp.Tables[0].Rows.Count;
RadioButton[] rd = new RadioButton[iCnt];
string[] strGrp = new string[iCnt];
int i = 0;
Table tbl = new Table();
TableRow tr = null;
TableCell tc = null;
tbl.Width = new Unit("100%");
for (int ci = 0; ci < iCnt; ci++)
{
if (ci % 1 == 0) // to make 4 columns in a row
{
tr = new TableRow();
tbl.Rows.Add(tr);
}
rd[ci] = new RadioButton();
rd[ci].GroupName = "RdoCompGrp";
rd[ci].ID = ci.ToString();
rd[ci].Text = myDS_Comp.Tables[0].Rows[ci][0].ToString();
DataSet MyDataSet = new DataSet();
MyDataSet = myDBcalls.ReturnDataSet("select distinct PNum, Description from tblConfigurations,tblGroupsPerConfiguration,tblGroups,tblGroupNames,tblDrawingsPerGroup,tblDrawings,tblPartsPerDrawing,tblParts WHERE tblConfigurations.tblConfigurationsIdx=" + Session["cid"] + " and tblConfigurations.tblConfigurationsIdx=tblGroupsPerConfiguration.tblConfigurationsIdx and tblGroupsPerConfiguration.tblGroupsIdx=tblGroups.tblGroupsIdx and tblGroups.tblGroupNamesIdx=tblGroupNames.tblGroupNamesIdx and tblGroupNames.GroupName='" + myDS_Comp.Tables[0].Rows[ci][0].ToString() + "' and tblGroups.tblGroupsIdx=tblDrawingsPerGroup.tblGroupsIdx and tblDrawingsPerGroup.GType in ('0') and tblDrawingsPerGroup.tblDrawingsIdx=tblDrawings.tblDrawingsIdx and tblDrawings.tblDrawingsIdx=tblPartsPerDrawing.tblDrawingsIdx and tblPartsPerDrawing.tblPartsIdx=tblParts.tblPartsIdx AND IPD=1 order by Description");
strTp = "Parts have sublist";
try
{
tc = new TableCell();
tc.Controls.Add(rd[ci]);
tr.Cells.Add(tc);
rd[ci].CssClass = "PABodySmallText1";
rd[ci].CheckedChanged += new EventHandler(CheckedChanged);
rd[ci].AutoPostBack = true;
rd[ci].ToolTip = strTp;
foreach (DataRow dr1 in MyDataSet.Tables[0].Rows)
{
if (strTp == "Parts have sublist")
strTp = "";
strTp = strTp + dr1["Description"] + " - " + dr1["PNum"] + "\n";
}
rd[ci].ToolTip = strTp;
MyDataSet.Dispose();
}
catch { }
}
Panel1.Controls.Add(tbl);
}
Ravikumar GPosted May 14, 2013, 6:40 AM