how can I rename Column at GridView ( I need code for code-behind), ASP.Net 2.0 VB.NET (URGENT)

how can I rename Column at GridView ( I need code for code-behind), ASP.Net 2.0 VB.NET
Hurolulu
0
hur
5/4/2007 8:31:01 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
875 Views

Similar Articles

[PageSpeed] 43

You can do this in the GridView's RowDataBound or RowCreated event. You just have to filter the RowType to make sure it's a Header.

The sample below is in C# if you don't mind. 

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

{

    if(e.Row.RowType == DataControlRowType.Header)

    {

        e.Row.Cells[0] = "Column Name";

    }

}
 

Hope this helps. 

0
kimoy
5/5/2007 1:37:50 PM
Reply:

Similar Artilces:

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

Translate c#.net code to vb.net code
Hi I can usually do the translation myself, but this time I am a bit stumped  Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder. class UrlRewriteModule : IHttpModule{    public void Dispose()    {        // Nothing to dispose    }    public void Init(HttpApplication context)    {        context.BeginRequest += new EventHandler(context...

LDAP Authentication .Net 1.0 code to .Net 2.0
A few years ago with help of Dunry (I think he wrote most of the LDAP part) we came up with the below C# that works in our environment. We now need to migrate this to .Net 2.0.Does anyone have any examples of something simliar that works in .Net 2.0? Thanks in advance.private void btnSubmit_Click(object sender, System.EventArgs e)  {   if(Page.IsValid)   {    SearchDirectoryUsername(txtUsername.Text);   }  }  private void SearchDirectoryUsername(string username)  {   using ...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

How do you code yours? Design Time or Code Behind (.net 2.0)?
What’s your preferred method when coding?   I have noticed in a lot of books and even the Quick start Tutorials section of the site they use Design Time examples using Drag and Drop examples with visual studio. Surely having code in your .aspx file such as asp:ObjectDataSource is not the best method. Surley the best method is to use classes with code behind?   Your comments would be very much appreciated.   Thanks   WD ThanksWDRocket Whois - http://www.rocketwhois.co.uk/ IMO, it depends on what you are doing. If you are creating one web form or a very small sit...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Code works with .Net 1.1 but not .Net 2.0
Can anyone offer any suggestions as to why this code would work under .Net 1.1 and not .Net 2.0? I listed the error I receive below, also. Line 865. Thank you, Public Function GetAge(ByVal Birthdate As System.DateTime, _ Optional ByVal AsOf As System.DateTime = #1/1/1700#) _ As Integer Dim iMonths As Integer Dim iYears As Integer Dim dYears As Decimal Dim lDayOfBirth As Long Dim lAsOf As Long Dim iBirthMonth As Integer Dim iAsOFMonth As Integer If AsOf = "#1/1/1700#" ...

.Net 2
Hi Friends, I want to show Different Tabs for different information on my web form ( .aspx page ). I could not found Tab Control with .net 2005. I know there is some but couldnt find it. Can you please tell me from where can I add Tab Control to my web form ? Thanks in advance, Nirav With some tedious settings of properties on the menu control, it will behave like a tab control.  Then you need to use a multiview control and fill it with views.  Then you need to wire up the menu to the multiview or something.  I tried this before and it works, but we wrote our own contro...

accessing user control property and method from code behind in app.net 2.0
I am working in asp.net 2.0.  I am creating an user control and want to access the public property from page code behind page but its generating error.My code is------------------------------------------------------------------------------------------ MyUC.ascx  <%@ Control Language="VB" AutoEventWireup="false" CodeFile="MyUC.ascx.vb" Inherits="MyUC" %>Imports System.DataPartial Class MyUC    Inherits System.Web.UI.UserControl  Private _data As DataTable    Public Property MyDataSource() As DataTable&n...

Conversion of code from .net 1.1 to .net 2.0 posing a problem
Originally Posted by Akshay_Jadhav on the Microsoft Interoperability - Technical Interoperability Scenarios forumHI,I have converted .net 1.1 code to .net 2.0 using .net wizard. i have radiobutton whose checked property is set to false on page load, on clicking of a button on that page checked property of radiobutton is set to true and a dropdownlist is enabled. when i select some value in dropdownlist the page is posted back and checked property of radiobutton is again set to false(automatically) which is wrong, it should be true. Same code is working fine in .net 1.1,when i select som...

need code for updating gridview in .NET 2.0 without using sql data source
hi,this is satish,I have faced problem to update the gridview with template columns in .NET 2.0 without using sql datasource.So please send me the code with events for updating gridview with teplate columns including one dropdownlist inatead of textbox without using sql data source.i hope you will understand my question, please send the answer ASAP.Waiting for reply,regards You will need to deal with it as if it was a traditional GridView in ASP.NET 1.x. Hope this helps! Hammoudeh AhmadWE never know how high we are ... Till we are called to rise And then, if we are true to...

Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working). Here is what I am trying from the load event: Sub BindData() Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql")) Dim strPersonSQL, strActSQL As String strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person" Dim myPerCommand As New MySqlClient.MySqlComm...

Can a page written in VB.Net 1.1 work with .Net 2.0 dlls?
Hi, Previously the Vb .Net page was working fine with GAC dll written .Net 1.1 . But the GAC dlls have been upgraded to 2.0 version and the page is thorowing error :"BC30002: Type 'CompanyUser' is not defined", where 'CompanyUser'is the class of the GAC dll. Can u help on this so that this page can be run without converting it to .Net 2.0? Thanks, SonaliThanks,Sonali  I think that you can set in IIS your page to run under 2.0. You do not have to upgrade site.__Please mark post as answer if it helps, if not come back and ask again! Hi, The only thin...

Web resources about - how can I rename Column at GridView ( I need code for code-behind), ASP.Net 2.0 VB.NET (URGENT) - asp.net.presentation-controls

Resources last updated: 11/24/2015 12:53:34 PM