PC Review


Reply
Thread Tools Rate Thread

DataGrid Column

 
 
Jassim Rahma
Guest
Posts: n/a
 
      22nd Sep 2005
Hi,

I am using the following code but I want to change the column caption,
let's say for the AGE_DISTIBUTION..

// connect to database;
eziDatabase.DatabaseName = strDatabase;
eziDatabase.Cypher = CypherType.Blowfish;
eziDatabase.Password = "17218881";
eziDatabase.Parameters = 0;
eziDatabase.Exclusive = true;

eziDatabase.Connect();

// DataSet & dataGrid;
dsEziAgeband.Database = eziDatabase;
dsEziAgeband.TableName = "EZI_AGES";
dgEziAgeband.DataSource = dsEziAgeband;
dsEziAgeband.Open();
dsEziAgeband.ActiveIndex = "AGE_SERIAL";
// dgEziAgeband.CaptionText = "Age Distribution";

//Set filter to "select" all rows , "where" x >= 1 and x <= 2 and y = 1
dsEziAgeband.SetFilter("ezi_id = " + GlobalVariables.RecordId);

//If you want to hide some columns use next lines
dsEziAgeband.ShowHiddenColumns = false;
dsEziAgeband.Columns["AGE_ID"].Hidden = true;
dsEziAgeband.Columns["EZI_ID"].Hidden = true;
dsEziAgeband.Columns["AGE_SERIAL"].Hidden = true;
dsEziAgeband.Columns["HireDate"].DefaultCellStyle.Format = "y";
dsEziAgeband.Columns["AGE_DESCRIPTION"].Hidden = false;
dsEziAgeband.Columns["AGE_EMPLOYEE"].Hidden = false;
dsEziAgeband.Columns["PREM_RATE_PER_1000"].Hidden = false;
dsEziAgeband.Columns["SUM_INSURED"].Hidden = false;
dsEziAgeband.Columns["TOTAL_PREM"].Hidden = false;
dsEziAgeband.Columns["CREATED_BY_USER"].Hidden = true;
dsEziAgeband.Columns["CREATED_BY_IP"].Hidden = true;
dsEziAgeband.Columns["CREATED_BY_COMPUTER"].Hidden = true;
dsEziAgeband.Columns["CREATED_BY_OS"].Hidden = true;
dsEziAgeband.Columns["UPDATED_BY_USER"].Hidden = true;
dsEziAgeband.Columns["UPDATED_BY_IP"].Hidden = true;
dsEziAgeband.Columns["UPDATED_BY_COMPUTER"].Hidden = true;
dsEziAgeband.Columns["UPDATED_BY_OS"].Hidden = true;


Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu Microsoft ASP .NET 1 25th Mar 2006 01:24 PM
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams Microsoft ASP .NET 0 2nd Mar 2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= Microsoft ASP .NET 0 2nd Mar 2004 08:31 PM
Need Help Determining DataGrid Column Selected for Sort using IBindingList - Datagrid.zip (0/1) David Elliott Microsoft Dot NET Framework Forms 1 18th Jul 2003 02:22 AM
Need Help Determining DataGrid Column Selected for Sort using IBindingList - Datagrid.zip (0/1) David Elliott Microsoft Dot NET Framework Forms 0 18th Jul 2003 02:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:58 AM.