S
Samy
Hi There,
I have a label in a datagrid which I make it a input type = radio in
ItemDataBound so that radio buttons are shown in the datagrid.
This is how I have it...
ASPX...
<asp:Label ID="_selectedRBtn" Runat="server"></asp:Label>
ASPX.CS
Label _selectedProfile = (Label)
e.Item.Cells[0].FindControl("_selectedRBtn");
_selectedProfile.Text = "<input type=radio name='RBtnSelection' value="
+ (int)this._constraints.DataKeys[e.Item.ItemIndex] + ">";
And I check the
if(Request.Form["RBtnSelection"] != null)
{
int SelectedID = int.Parse(Request.Form["RBtnSelection"]);
}
to retrieve the Id selected..
I have a delete button which when clicked should pop up a confirmation
pop up and then only delete the particular row...I am unable to figure
out when and where I have to add the onclick attribute for it....like.
this._deleteBtn.Attributes.Add("onclick", "return Confirm_Delete();");
Can somebody please suggest me how to do this??
Thanks a lot.
I have a label in a datagrid which I make it a input type = radio in
ItemDataBound so that radio buttons are shown in the datagrid.
This is how I have it...
ASPX...
<asp:Label ID="_selectedRBtn" Runat="server"></asp:Label>
ASPX.CS
Label _selectedProfile = (Label)
e.Item.Cells[0].FindControl("_selectedRBtn");
_selectedProfile.Text = "<input type=radio name='RBtnSelection' value="
+ (int)this._constraints.DataKeys[e.Item.ItemIndex] + ">";
And I check the
if(Request.Form["RBtnSelection"] != null)
{
int SelectedID = int.Parse(Request.Form["RBtnSelection"]);
}
to retrieve the Id selected..
I have a delete button which when clicked should pop up a confirmation
pop up and then only delete the particular row...I am unable to figure
out when and where I have to add the onclick attribute for it....like.
this._deleteBtn.Attributes.Add("onclick", "return Confirm_Delete();");
Can somebody please suggest me how to do this??
Thanks a lot.