Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
GeneralRe: List compare algorithm Pin
DavidNohejl27-Mar-08 4:51
DavidNohejl27-Mar-08 4:51 
GeneralRe: List compare algorithm Pin
Stevo Z27-Mar-08 5:13
Stevo Z27-Mar-08 5:13 
GeneralRe: List compare algorithm Pin
DavidNohejl27-Mar-08 5:59
DavidNohejl27-Mar-08 5:59 
GeneralRe: List compare algorithm Pin
Stevo Z27-Mar-08 6:41
Stevo Z27-Mar-08 6:41 
QuestionChange mouse cursor when hover mouse over a DataGridView cell's border ? Pin
nesaver8527-Mar-08 1:47
nesaver8527-Mar-08 1:47 
AnswerRe: Change mouse cursor when hover mouse over a DataGridView cell's border ? Pin
Eswara Kumar2-Apr-10 2:32
Eswara Kumar2-Apr-10 2:32 
General[Message Deleted] Pin
nesaver8527-Mar-08 1:32
nesaver8527-Mar-08 1:32 
GeneralRe: Merge cells in DataGridView ? Pin
Anoop Unnikrishnan27-Mar-08 1:37
Anoop Unnikrishnan27-Mar-08 1:37 
Drag and drop a GridView and name it as GridView1

Try the below code for merging the header
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...
GeneralRe: Merge cells in DataGridView ? Pin
jp2code28-Jan-10 4:58
professionaljp2code28-Jan-10 4:58 
GeneralDataTable rows Pin
NewToAspDotNet27-Mar-08 1:26
NewToAspDotNet27-Mar-08 1:26 
GeneralRe: DataTable rows Pin
Anoop Unnikrishnan27-Mar-08 1:34
Anoop Unnikrishnan27-Mar-08 1:34 
GeneralRe: DataTable rows Pin
NewToAspDotNet27-Mar-08 1:54
NewToAspDotNet27-Mar-08 1:54 
GeneralRe: DataTable rows Pin
Evan St. John27-Mar-08 9:18
Evan St. John27-Mar-08 9:18 
GeneralJavascript Pin
simworld27-Mar-08 1:16
simworld27-Mar-08 1:16 
GeneralRe: Javascript Pin
r aa j27-Mar-08 1:23
r aa j27-Mar-08 1:23 
AnswerRe: Javascript Pin
Rajesh R Subramanian27-Mar-08 1:26
professionalRajesh R Subramanian27-Mar-08 1:26 
GeneralRe: Javascript Pin
Anoop Unnikrishnan27-Mar-08 1:28
Anoop Unnikrishnan27-Mar-08 1:28 
GeneralThreading Best Practice Pin
Jammer27-Mar-08 1:11
Jammer27-Mar-08 1:11 
GeneralRe: Threading Best Practice Pin
Rob Philpott27-Mar-08 3:06
Rob Philpott27-Mar-08 3:06 
GeneralRe: Threading Best Practice Pin
Jimmanuel27-Mar-08 3:08
Jimmanuel27-Mar-08 3:08 
GeneralRe: Threading Best Practice Pin
Jammer27-Mar-08 3:47
Jammer27-Mar-08 3:47 
QuestionHow to throw Exception to calling function ? Pin
pekhaleyogesh27-Mar-08 1:06
pekhaleyogesh27-Mar-08 1:06 
AnswerRe: How to throw Exception to calling function ? Pin
r aa j27-Mar-08 1:19
r aa j27-Mar-08 1:19 
GeneralRe: How to throw Exception to calling function ? Pin
J4amieC27-Mar-08 1:22
J4amieC27-Mar-08 1:22 
GeneralRe: How to throw Exception to calling function ? Pin
pekhaleyogesh27-Mar-08 1:56
pekhaleyogesh27-Mar-08 1:56 

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.