Advertisement

03.18.2008 at 08:41AM PDT, ID: 23250582
[x]
Attachment Details

problem in datagrid with link button template column

Asked by gladstonesheeba in Microsoft Visual C#.Net, .NET, C# Programming Language

Tags: , , ,

Here's my problem

I have a datagrid with a linkbutton column. when i click the link in any row the link button text should display it in the label control in the webpage

<asp: Datagrid>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Linkbutton id="linkuser" runat="server" text='<%#Databinder.Eval(Container.DataItem,"FullName")%>' onclick="showtext"/>
</itemtemplate></asp:TemplateColumn></asp:Datagrid>

Protected void showtext(object o event args e)
{
Linkbutton1=new LinkButton();
Linkbutton1=(Linkbutton)dg.FindControl("linkuse");

//I don't know how to take that particular column data of a particular row. Please help me in this. hope you've understood what iam trying to do.

Label1.text=Linkbutton1.text;
}

The link button column is like this

Elizabeth
Mian
Laura
Mike

if i click Elizabeth the label should show the text Elizabeth in the webpage
if i click Mian , then label .text should be Mian

Please help me thanks
Start Free Trial
 
Loading Advertisement...
 
[+][-]03.18.2008 at 09:07AM PDT, ID: 21152543

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 09:12AM PDT, ID: 21152597

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .NET, C# Programming Language
Tags: microsoft, dotnet, 2008, C#.net
Sign Up Now!
Solution Provided By: renjurdevan
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628