Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
treilly via DotNetMonster.com #1
LinkButton question
Hi,
I have a LinkButton that I am programming in my code-behind file to go in the
first column of my datagrid. The way I have it now, the button is clickable
(meaning my mouse pointer changes to a pointing hand) - however, I can't
figure out how to wire it up correctly. Here is the code I currently have to
do that:
LinkButton arrowBtn = new LinkButton();
arrowBtn.CommandName = "cmdArrowDown";
arrowBtn.Text = "<div class='arrowDown'><img src='arrowdownVA.gif' border='0'
/></div>";
e.Item.Cells[0].Controls.Add(arrowBtn);
As you can tell, I am making the button an image (arrowdownVA.gif). This part
works correctly. In the datagrid, I can click on the arrow image- But it
does nothing. I thought having a function like
case "cmdArrowDown":
{
CODE GOES HERE
}
in my ItemClick event handler (which takes in (object source,
datagridcommandeventargs e) and switches according to the e.CommandName)
would do the trick. But after debugging, it appears that my code never
reaches this section. Am I missing something when I am creating this control?
I am very new to ASP.NET, so please forgive my ignorance. Thanks for the help
in advance
-TR
--
Message posted via [url]http://www.dotnetmonster.com[/url]
treilly via DotNetMonster.com 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... -
Linkbutton does not look like a linkbutton
OK, I almost got my problem solved. Zen is almost there! Just that a LinkButton control inside a column in my datagrid doesn't show like a link... -
Question about LinkButton on datagrid
other than using client side scripting, is there any way I can trap the click of a LinkButton column in a datagrid. I want to move user to a... -
LinkButton
Hi, I create a LinkButton in runtime, and I want to be able to access a function when a user clicks on the generated link in the page. My problem... -
Format of LinkButton..?
How can I make my linkbuttons color always blue even if they are visited or not, and make them underline in hover mode free from browser settings..



Reply With Quote

