Hi All,
I am trying to make the gridview row bold, The first row of my gridview is linkbuttons. when someone clicks on the linkbutton then I want to make the row bold, this works fine in my code, I want to show a pop up message to the user if the user clicks on another link button. the pop up message should say "You are leaving the link (Old Link Button ID) and you are going to (new link button ID) here. Are you Sure? if the user clicks "Yes" in the pop up window then I need to bold the new link button row that the user just clicked otherwise if the user clicks "NO" or cancel then I need to keep the old link button row bolded.
I tried lot of things and put lot of hours in it, but couldn't get forward with this. Below is my code
In above code lblIDTemp is the value of the old link button which I stored in a hidden variable and lblID is the new link button value which i stored in another hidden varaible.
Any help will be higly apprecaited. I am trying to solve this problem since morning and don't know how to solve it.
I am trying to make the gridview row bold, The first row of my gridview is linkbuttons. when someone clicks on the linkbutton then I want to make the row bold, this works fine in my code, I want to show a pop up message to the user if the user clicks on another link button. the pop up message should say "You are leaving the link (Old Link Button ID) and you are going to (new link button ID) here. Are you Sure? if the user clicks "Yes" in the pop up window then I need to bold the new link button row that the user just clicked otherwise if the user clicks "NO" or cancel then I need to keep the old link button row bolded.
I tried lot of things and put lot of hours in it, but couldn't get forward with this. Below is my code
This is inside the DataBound event of grid:
foreach (GridDataItem item in RadGrid_IDPicker.Items)
{
if (Convert.ToString(DataBinder.Eval(item.DataItem, "IID")) == lblID.Text)
{
item.Style.Add(HtmlTextWriterStyle.FontWeight, "Bold");
}
if (lblIDTemp.Text != lblID.Text)
{
string radalertscript = "<
script
language
=
'javascript'
>function f(){confirm_select('" + lblIDtemp.ClientID + "'); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</
script
>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", radalertscript);
}
}
In above code lblIDTemp is the value of the old link button which I stored in a hidden variable and lblID is the new link button value which i stored in another hidden varaible.
Any help will be higly apprecaited. I am trying to solve this problem since morning and don't know how to solve it.