GridView Doubt to add the Linkbutton

Posted by Mdjack under ASP.NET on 9/27/2011 | Points: 10 | Views : 4103 | Status : [Member] | Replies : 6
How to Add the the Linkbutton inside the DataGrid. currently i using the following code.

<asp:BoundColumn DataField="name" HeaderText="Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
<HeaderStyle CssClass="ItemTemplateColumnStyle GridBorderRight PL2"></HeaderStyle>
<ItemStyle CssClass="ItemTemplateColumnStyle GridBorderRight GridBorderTop GridBorderBottom PL2">
</ItemStyle></asp:BoundColumn>

N. MOHAMED ZACKKARIAH


Responses

Posted by: Blessyjees on: 9/27/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,
Try this
<asp:TemplateField HeaderText="Name"> <ItemTemplate>


<asp:LinkButton ID="link1" runat="server" OnClick="lnk1Click"/>

</ItemTemplate> </asp:TemplateField>



Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/27/2011 [Member] Starter | Points: 25

Up
0
Down
How create a new column with the Link button? in asp.net

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/27/2011 [Member] Starter | Points: 25

Up
0
Down
In my DataGrid. How can add the the Linkbuttons?. I am trying that above code is not working ........!!

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/27/2011 [Member] Starter | Points: 25

Up
0
Down
When i load the Page I am facing the following error

Microsoft JScript runtime error: Object required

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi blessyjees,

Thanks to reply me . The following code is work for my requirement.
<asp:ButtonColumn Text="Permissions" CommandName="cmdPermission" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
<HeaderStyle Width="40px" CssClass="ItemTemplateColumnStyle GridBorderRight"></HeaderStyle>
<ItemStyle Width="40px" HorizontalAlign="Center" ForeColor="#414E61"></ItemStyle>
</asp:ButtonColumn>

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CS1401 on: 9/27/2011 [Member] Starter | Points: 25

Up
0
Down
http://csharpdotnetfreak.blogspot.com/2009/04/linkbutton-gridview-querystring.html

refer this one.

...

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response