Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to: Radiobutton check event confirmation ??? Pin
biscoito27-Feb-08 17:09
biscoito27-Feb-08 17:09 
QuestionHow to get a multiline head using DataGridView? Pin
xzl123427-Feb-08 16:04
xzl123427-Feb-08 16:04 
AnswerRe: How to get a multiline head using DataGridView? Pin
Xmen Real 27-Feb-08 16:10
professional Xmen Real 27-Feb-08 16:10 
GeneralRe: How to get a multiline head using DataGridView? Pin
xzl123427-Feb-08 16:22
xzl123427-Feb-08 16:22 
GeneralRe: How to get a multiline head using DataGridView? Pin
Xmen Real 27-Feb-08 16:23
professional Xmen Real 27-Feb-08 16:23 
GeneralRe: How to get a multiline head using DataGridView? Pin
xzl123427-Feb-08 22:13
xzl123427-Feb-08 22:13 
GeneralRe: How to get a multiline head using DataGridView? Pin
Xmen Real 27-Feb-08 22:18
professional Xmen Real 27-Feb-08 22:18 
AnswerRe: How to get a multiline head using DataGridView? Pin
Anoop Unnikrishnan27-Feb-08 18:32
Anoop Unnikrishnan27-Feb-08 18:32 
Drag and drop a GridView and name it as GridView1

Try the below code
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable("Employee");
//Name Age Gender Mobile Phone Email
dt.Columns.Add("Name");
dt.Columns.Add("Age");
dt.Columns.Add("Gender");
dt.Columns.Add("Mobile");
dt.Columns.Add("Phone");
dt.Columns.Add("Email");
dt.Rows.Add("Anoop", "25", "Male", "996633352", "02255566", "anoopukrish@gmail.com");
GridView1.DataSource = dt;
GridView1.DataBind();

}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{

GridView gridView = (GridView)sender;
GridViewRow gridViewRow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert);
TableCell tableCell = new TableCell();

//add Personal Info
tableCell.Text = "Personal Info";
tableCell.Attributes.Add("style", "text-align: center");
tableCell.ColumnSpan = 3;
gridViewRow.Cells.Add(tableCell);

//Add Contact Info
tableCell = new TableCell();
tableCell.Attributes.Add("style", "text-align: center");
tableCell.Text = "Contact Info";
tableCell.ColumnSpan = 3;
gridViewRow.Cells.Add(tableCell);
GridView1.Controls[0].Controls.AddAt(0, gridViewRow);
}
}


... There by u get the desired output...

Shucks | :-\ ____________________Cool | :cool:
Anoop Unnikrishnan
GeneralRe: How to get a multiline head using DataGridView? Pin
xzl123427-Feb-08 21:58
xzl123427-Feb-08 21:58 
QuestionRight Align Data Grid View Column and Format Data Grid View Column for money Pin
jasper01827-Feb-08 15:37
jasper01827-Feb-08 15:37 
GeneralRe: Right Align Data Grid View Column and Format Data Grid View Column for money Pin
Xmen Real 27-Feb-08 15:47
professional Xmen Real 27-Feb-08 15:47 
GeneralRe: Right Align Data Grid View Column and Format Data Grid View Column for money Pin
jasper01827-Feb-08 15:53
jasper01827-Feb-08 15:53 
GeneralRe: Right Align Data Grid View Column and Format Data Grid View Column for money Pin
Xmen Real 27-Feb-08 15:57
professional Xmen Real 27-Feb-08 15:57 
QuestionWhat object is that Error List? Pin
Ian Uy27-Feb-08 14:49
Ian Uy27-Feb-08 14:49 
AnswerRe: What object is that Error List? Pin
Xmen Real 27-Feb-08 15:01
professional Xmen Real 27-Feb-08 15:01 
GeneralRe: What object is that Error List? Pin
Ian Uy27-Feb-08 15:03
Ian Uy27-Feb-08 15:03 
GeneralRe: What object is that Error List? Pin
Xmen Real 27-Feb-08 15:07
professional Xmen Real 27-Feb-08 15:07 
QuestionHow to use ^ in C#? Pin
Joplinazz27-Feb-08 13:53
Joplinazz27-Feb-08 13:53 
AnswerRe: How to use ^ in C#? Pin
Anthony Mushrow27-Feb-08 13:58
professionalAnthony Mushrow27-Feb-08 13:58 
GeneralRe: How to use ^ in C#? Pin
Joplinazz27-Feb-08 14:24
Joplinazz27-Feb-08 14:24 
GeneralRe: How to use ^ in C#? Pin
Guffa27-Feb-08 14:26
Guffa27-Feb-08 14:26 
JokeRe: How to use ^ in C#? Pin
Jammer28-Feb-08 13:35
Jammer28-Feb-08 13:35 
AnswerAdditional Edification Pin
Ennis Ray Lynch, Jr.27-Feb-08 16:54
Ennis Ray Lynch, Jr.27-Feb-08 16:54 
GeneralSaving DataSet Information and then retrieving it [modified] Pin
ConfusedProgger27-Feb-08 13:20
ConfusedProgger27-Feb-08 13:20 
GeneralFXCop Help Pin
Jammer27-Feb-08 13:07
Jammer27-Feb-08 13:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.