|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Add Columns to GridView Programmatically I can add template field but i am facing the problem while capturing events of the template. I am trying to add template field to an ASP.NET GridView control using C# programmatically. I had column with template which contain check box. The javascript is activated on the row when i click on that check box. Is their another way to do this by danamic method. Any recommendations and suggestions are appreciated. |
#2
| |||
| |||
Re: Add Columns to GridView Programmatically Code: GridView1.AutoGenerateColumns = False Dim Field As New BoundField Field.DataField = "UID" Field.HeaderText = "User ID" Dim Col As DataControlField = Field GridView1.Columns.Add(Column) Field = New BoundField Field.DataField = "UROLLNO" Field.HeaderText = "User Roll No" Col = Field GridView1.Columns.Add(Column) Field = New BoundField Field.DataField = "UDATA" Field.HeaderText = "User Data Information" Col = Field GridView1.Columns.Add(Column) GridView1.DataBind() |
#3
| |||
| |||
Re: Add Columns to GridView Programmatically I added progrmmaticaly a templateField into GridView. In ASP.Net 2.0 we have a DataView “SORT” property that solves this problem easily and effectively. Code: <div> <asp:GridView ROLL NO="GridView1" runat="server"> </asp:GridView> </div> |
#4
| |||
| |||
Re: Add Columns to GridView Programmatically I have this code in the aspx file of a GridView control: Code: <asp:TemplateField > <ItemTemplate> <asp:CheckBox ID="chkNotifierAdd" runat="server"/> </ItemTemplate> </asp:TemplateField> |
![]() |
|
Tags: adding column, asp, gridview programmatically |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change FireFox proxy setting programmatically | Puloma | Software Development | 4 | 21-09-2010 06:50 AM |
asp.net adding databound hyperlink columns to gridview programmatically | Amitesh | Software Development | 2 | 05-06-2009 12:02 AM |
Programmatically add a database | Zool | Software Development | 2 | 19-05-2009 09:08 PM |
Free SMS Server to send SMS programmatically | Cavan | Networking & Security | 3 | 16-05-2009 08:23 PM |
asp.net gridview to pdf | Dietrich | Software Development | 1 | 05-02-2009 12:15 PM |