> Hi,
>
[quoted text clipped - 72 lines]
> }
> }
Hello mate,
Basically, either by Serverside or Client side, you need to loop
through each row and cell and set the option to false.
Serverside this would be something like the below
Get instance to GridView
foreach row get the column that has the radio button
if this RadioButton.Checked == true, then RadioButton.Checked = false
HTH,
Jon
www.nantwichonline.com
ABHIJIT B - 05 Feb 2008 19:00 GMT
Thanks John for your reply.
I am using DatagRid and following code.Smimilarly I want for GridView
control.
Like in Datagrid we have Items collection to loop through each row of
datagrid.
Iw ant to know which collection is available for GridView in which I
can use FindControl property.
public void SelectOnlyOne( object sender, EventArgs e)
{
string m_ClientID = "";
RadioButton rb = new RadioButton();
rb = (RadioButton)(sender);
m_ClientID = rb.ClientID;
foreach (DataGridItem i in grdReport.Items)
{
rb = (RadioButton)(i.FindControl("rdbBatchTime"));
rb.Checked = false;
if (m_ClientID == rb.ClientID)
{
rb.Checked = true;
}
//Get selected value
if (rb.Checked == true)
{
if (i.Cells[1].Text.Trim().ToString() == " ")
hidLoginID.Value = "";
else
hidLoginID.Value =
i.Cells[1].Text.Trim().ToString();
if (i.Cells[2].Text.Trim().ToString() == " ")
hidFirstName.Value = "";
else
hidFirstName.Value =
i.Cells[2].Text.Trim().ToString();
if (i.Cells[3].Text.Trim().ToString() == " ")
hidLastName.Value = "";
else
hidLastName.Value =
i.Cells[3].Text.Trim().ToString();
}
}
}
> On 4 Feb, 19:20,ABHIJITB<abhijitbavdhan...@gmail.com> wrote:
>
[quoted text clipped - 91 lines]
>
> - Show quoted text -