Click here to Skip to main content
15,913,283 members
Home / Discussions / C#
   

C#

 
GeneralRe: concatenation of multiple value Pin
OriginalGriff10-Jul-10 2:07
mveOriginalGriff10-Jul-10 2:07 
AnswerRe: concatenation of multiple value Pin
DaveyM6910-Jul-10 2:03
professionalDaveyM6910-Jul-10 2:03 
AnswerRe: concatenation of multiple value Pin
PIEBALDconsult10-Jul-10 3:56
mvePIEBALDconsult10-Jul-10 3:56 
AnswerRe: concatenation of multiple value Pin
Abhinav S10-Jul-10 5:17
Abhinav S10-Jul-10 5:17 
QuestionHow to mearge 2 column in dagagridview in C# application?? [modified] Pin
Sunil G9-Jul-10 20:53
Sunil G9-Jul-10 20:53 
AnswerRe: How to set Image in particular cell in DataGridView in C# Pin
Abhinav S9-Jul-10 21:01
Abhinav S9-Jul-10 21:01 
GeneralRe: How to set Image in particular cell in DataGridView in C# Pin
Sunil G9-Jul-10 21:18
Sunil G9-Jul-10 21:18 
AnswerRe: How to mearge 2 column in dagagridview in C# application?? Pin
Peace ON9-Jul-10 21:20
Peace ON9-Jul-10 21:20 
One way you can do this is to use the CellsPainting event to draw the
bitmap for a particular cell. Here is code that does this ssuming the bitmap is in an imagelist.

C#
//this.images is an ImageList with your bitmaps
void dataGridView1_CellPainting(object sender,
DataGridViewCellPaintingEventArgs e)
{
    if (e.ColumnIndex == 1 && e.RowIndex == -1)
    {
        e.PaintBackground(e.ClipBounds, false);

        Point pt = e.CellBounds.Location;// where you want the bitmap
in the cell
        int offset = (e.CellBounds.Width -
this.images.ImageSize.Width) / 2;
        pt.X += offset;
        pt.Y += 1;
        this.images.Draw(e.Graphics, pt, 0);
        e.Handled = true;
    }
}



This is just an example. You can use this logic and solve your problem.



HTH
Jinal Desai - LIVE
Experience is mother of sage....

GeneralRe: How to mearge 2 column in dagagridview in C# application?? Pin
Sunil G9-Jul-10 21:27
Sunil G9-Jul-10 21:27 
QuestionStore /Retrieve Text in file Pin
annmarypaul9-Jul-10 11:51
annmarypaul9-Jul-10 11:51 
AnswerRe: Store /Retrieve Text in file Pin
PIEBALDconsult9-Jul-10 12:47
mvePIEBALDconsult9-Jul-10 12:47 
AnswerRe: Store /Retrieve Text in file Pin
Peace ON9-Jul-10 19:16
Peace ON9-Jul-10 19:16 
AnswerRe: Store /Retrieve Text in file Pin
Abhinav S9-Jul-10 19:51
Abhinav S9-Jul-10 19:51 
Questionhttpwebrequest getResponse( ) freezes my program Pin
jasonneverland9-Jul-10 5:14
jasonneverland9-Jul-10 5:14 
AnswerRe: httpwebrequest getResponse( ) freezes my program Pin
Ennis Ray Lynch, Jr.9-Jul-10 8:31
Ennis Ray Lynch, Jr.9-Jul-10 8:31 
GeneralRe: httpwebrequest getResponse( ) freezes my program Pin
Luc Pattyn9-Jul-10 9:54
sitebuilderLuc Pattyn9-Jul-10 9:54 
GeneralRe: httpwebrequest getResponse( ) freezes my program Pin
Ennis Ray Lynch, Jr.9-Jul-10 10:06
Ennis Ray Lynch, Jr.9-Jul-10 10:06 
GeneralRe: httpwebrequest getResponse( ) freezes my program Pin
Luc Pattyn9-Jul-10 10:09
sitebuilderLuc Pattyn9-Jul-10 10:09 
QuestionHowTo: Accessing a cell in a multidimensional ArrayList Pin
Shaareable9-Jul-10 5:10
Shaareable9-Jul-10 5:10 
AnswerRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
PIEBALDconsult9-Jul-10 5:18
mvePIEBALDconsult9-Jul-10 5:18 
GeneralRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
Shaareable9-Jul-10 5:34
Shaareable9-Jul-10 5:34 
GeneralRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
PIEBALDconsult9-Jul-10 5:36
mvePIEBALDconsult9-Jul-10 5:36 
AnswerRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
PIEBALDconsult9-Jul-10 5:52
mvePIEBALDconsult9-Jul-10 5:52 
GeneralRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
Shaareable9-Jul-10 5:55
Shaareable9-Jul-10 5:55 
GeneralRe: HowTo: Accessing a cell in a multidimensional ArrayList Pin
Paladin20009-Jul-10 8:07
Paladin20009-Jul-10 8: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.