S
savvy
savvy
Feb 1, 4:23 pm show options
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "savvy" <[email protected]> - Find messages by this author
Date: 1 Feb 2006 08:23:19 -0800
Local: Wed, Feb 1 2006 4:23 pm
Subject: How to Pre-Select a DataGrid Row Radiobutton ?
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse
I have used MetaBuilders.WebControls for including a radiobutton in a
datagrid. Its works fine with retreiving the checked radiobutton
datagrid row id. but i'm not able to preselect the row radiobutton
which matches with the database data. ok
I have a Datagrid which displays CV details created by a candidate. So
i want him to make only one of his CVs as a default one. Therefore i
included a radiobutton column which selects the particular row of the
datagrid and stores in it in the database with a Flag 1 or 0.
So, everytime i will be comparing the flag and if its 1 then i want the
radio button of that particular row to be checked. I tried alot but i'm
getting nowhere
Any help will be greatly appreciated
Thanks in Advance
I'm using this code
using MetaBuilders.WebControls;
objcmd = new SqlCommand("SelectCVdetails",
objConn);
objcmd.CommandType =
CommandType.StoredProcedure;
objcmd.Parameters.Add("@js_id",
Session["JSRegID"]);
objConn.Open();
objRdr = objcmd.ExecuteReader();
dgcvdetails.DataSource=objRdr;
dgcvdetails.DataBind();
objRdr.Close();
objConn.Close();
for (int i = 0; (i <= (dgcvdetails.Items.Count
- 1)); i++)
{
if ((dgcvdetails.Items.Cells[6].ID
== intcv_id.ToString()))
{
dgcvdetails.Items.BackColor
= System.Drawing.Color.Blue;
HtmlInputRadioButton rsc =
((HtmlInputRadioButton)(dgcvdetails.Items.FindControl("RowSelectorColumnSelector")));
rsc.Checked = true;
break;
}
}
Feb 1, 4:23 pm show options
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "savvy" <[email protected]> - Find messages by this author
Date: 1 Feb 2006 08:23:19 -0800
Local: Wed, Feb 1 2006 4:23 pm
Subject: How to Pre-Select a DataGrid Row Radiobutton ?
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse
I have used MetaBuilders.WebControls for including a radiobutton in a
datagrid. Its works fine with retreiving the checked radiobutton
datagrid row id. but i'm not able to preselect the row radiobutton
which matches with the database data. ok
I have a Datagrid which displays CV details created by a candidate. So
i want him to make only one of his CVs as a default one. Therefore i
included a radiobutton column which selects the particular row of the
datagrid and stores in it in the database with a Flag 1 or 0.
So, everytime i will be comparing the flag and if its 1 then i want the
radio button of that particular row to be checked. I tried alot but i'm
getting nowhere
Any help will be greatly appreciated
Thanks in Advance
I'm using this code
using MetaBuilders.WebControls;
objcmd = new SqlCommand("SelectCVdetails",
objConn);
objcmd.CommandType =
CommandType.StoredProcedure;
objcmd.Parameters.Add("@js_id",
Session["JSRegID"]);
objConn.Open();
objRdr = objcmd.ExecuteReader();
dgcvdetails.DataSource=objRdr;
dgcvdetails.DataBind();
objRdr.Close();
objConn.Close();
for (int i = 0; (i <= (dgcvdetails.Items.Count
- 1)); i++)
{
if ((dgcvdetails.Items.Cells[6].ID
== intcv_id.ToString()))
{
dgcvdetails.Items.BackColor
= System.Drawing.Color.Blue;
HtmlInputRadioButton rsc =
((HtmlInputRadioButton)(dgcvdetails.Items.FindControl("RowSelectorColumnSelector")));
rsc.Checked = true;
break;
}
}