Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
dei8fan #1
datagrid linkbutton event and firefox
I inherited some code with a datagrid being populated at run time (ASP.NET C#
page), and each row in the datagrid has a linkbutton. In IE, clicking on the
linkbutton displays the proper piece of content, in an IFRAME when the page
reloads.
In Firefox, I get a blank page. I can see HTML if I View Source, but it's
not the same HTML I get when using IE. It appears the event for the click on
the linkbutton is not running when using Firefox.
The datagrid settings:
AutoGenerateColumns = false
Enabled = true
EnableViewState = true
private void HelpChoicesDataGrid_ItemCommand(object sender,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "ViewHelp")
{
e.Item.BackColor = Color.DarkGray;
HyperLinkToSelection(Convert.ToString(e.Item.ItemI ndex));
}
} // End HelpChoicesDataGrid_ItemCommand
protected void HyperLinkToSelection(string bookmarkIndex)
{
System.Text.StringBuilder jScript = new System.Text.StringBuilder();
jScript.Append("<script language=\"JavaScript\">");
jScript.Append("location.href=\"#");
jScript.Append(bookmarkIndex);
jScript.Append("\";");
jScript.Append("</script>");
this.RegisterClientScriptBlock("Bookmark", jScript.ToString());
} // End HyperLinkToSelection
Any ideas?
Thanks,
Dennis
dei8fan Guest
-
Datagrid Linkbutton question
Hi, I have a problem that I'm having trouble figuring out. I have a datagrid with the first column being a ButtonColumn. This ButtonColumn... -
How to Simulate Click Event on DG LinkButton?
How can I programmatically simulate a click event on a datagrid linkbutton? I change the text of a linkbutton in a datagrid, then need to do some... -
linkbutton command event deletes grid
Hello, Ive got a datagrid that is created on a user control(ascx) page. My web form calls the user control and passes some property values to... -
LinkButton and Event Arguments
As LinkButton is a control of it's own, it handles itself its postback event handling (raises it's own Click event as a result). You can try to add... -
asp.net linkbutton event not firing
All, I am unsure of why this is happening... When I run the same code at work, I get the expected results. However, when I'm at home I...



Reply With Quote

