Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
AnswerRe: Crystal Reports distribution Pin
Rui Sousa19-Dec-05 23:51
Rui Sousa19-Dec-05 23:51 
QuestionInternet problems VS2005 Pin
zagzagzag19-Dec-05 21:08
zagzagzag19-Dec-05 21:08 
QuestionCrystal Report 9.0 not open in Windows XP Pin
joy_priyank19-Dec-05 19:44
joy_priyank19-Dec-05 19:44 
QuestionSet Password on sqlclient Pin
NMiceli19-Dec-05 18:41
NMiceli19-Dec-05 18:41 
AnswerRe: Set Password on sqlclient Pin
Guffa19-Dec-05 21:30
Guffa19-Dec-05 21:30 
AnswerRe: Set Password on sqlclient Pin
Umut ŞİMŞEK20-Dec-05 6:53
Umut ŞİMŞEK20-Dec-05 6:53 
QuestionHow to add picture while sorting in Data Grid (C#) Pin
Bipin Varankar19-Dec-05 18:10
Bipin Varankar19-Dec-05 18:10 
AnswerRe: How to add picture while sorting in Data Grid (C#) Pin
VPMahank20-Dec-05 3:43
VPMahank20-Dec-05 3:43 
Hai Bipin,

I had similar requirement for my project. What I did was subclass DataGrid and in the Overridden paint method, I would know the clip rectangle or the bounds of the cell. In the bounds I would call drawImage method and draw the Image in the right hand side/ left hand side of the cell based of the text alignment of the cell

Here is a part of what I did.....in Paint Method

// xpos basically keeps track of start position of each column.
int xpos = 0;
for (int i = 0; i < TableStyle.GridColumnStyles.Count; i++)
{
DataGridColumnStyle gc = TableStyle.GridColumnStyles[i]);
DrawSortableColumn(TableStyle.GridColumnStyles[i], xPos , e);
xPos += TableStyle.GridColumnStyles[i].Width;
}
// image drawing code


public void DrawSortableColumn()
{

int scrollValue = this.HorizScrollBar.Value; /* need to draw correctly when there is a horizontal scrool bar appearing */
if (cs.Alignment == HorizontalAlignment.Left)
{
e.Graphics.DrawImage(img, xPos + textWidth + 10 - scrollValue , 1, _ImageWidth, _ImageHeight);
}
else
{
e.Graphics.DrawImage(img, xPos + cs.Width - textWidth - 20 - scrollValue, 1, _ImageWidth, _ImageHeight);
}
}


Hope this helps
thanks,
VPMahank
QuestionExcel Export Pin
Mahi.Ragava19-Dec-05 18:00
Mahi.Ragava19-Dec-05 18:00 
AnswerRe: Excel Export Pin
KaptinKrunch19-Dec-05 18:13
KaptinKrunch19-Dec-05 18:13 
GeneralRe: Excel Export Pin
Mahi.Ragava19-Dec-05 18:24
Mahi.Ragava19-Dec-05 18:24 
GeneralRe: Excel Export Pin
Mahi.Ragava19-Dec-05 18:48
Mahi.Ragava19-Dec-05 18:48 
GeneralRe: Excel Export Pin
KaptinKrunch20-Dec-05 3:51
KaptinKrunch20-Dec-05 3:51 
AnswerRe: Excel Export Pin
narendrakumarp20-Dec-05 0:44
narendrakumarp20-Dec-05 0:44 
GeneralRe: Excel Export Pin
Mahi.Ragava20-Dec-05 17:22
Mahi.Ragava20-Dec-05 17:22 
QuestionHow to keep the popup open on click of another popup. Pin
Bipin Varankar19-Dec-05 17:58
Bipin Varankar19-Dec-05 17:58 
QuestionPropertyGrid : Remove properties at runtime Pin
ZejulioZ19-Dec-05 16:20
ZejulioZ19-Dec-05 16:20 
AnswerRe: PropertyGrid : Remove properties at runtime Pin
MyNothing19-Dec-05 16:50
MyNothing19-Dec-05 16:50 
GeneralRe: PropertyGrid : Remove properties at runtime Pin
ZejulioZ19-Dec-05 17:04
ZejulioZ19-Dec-05 17:04 
QuestionHow to unload image in a PictureBox control Pin
t800t819-Dec-05 15:15
t800t819-Dec-05 15:15 
AnswerRe: How to unload image in a PictureBox control Pin
MyNothing19-Dec-05 15:53
MyNothing19-Dec-05 15:53 
GeneralRe: How to unload image in a PictureBox control Pin
t800t819-Dec-05 16:00
t800t819-Dec-05 16:00 
QuestionHang Time Pin
tatchung19-Dec-05 15:14
tatchung19-Dec-05 15:14 
AnswerRe: Hang Time Pin
tatchung19-Dec-05 15:38
tatchung19-Dec-05 15:38 
Questionhow i can hide command prompt in C# console application? Pin
Developer_119-Dec-05 14:01
Developer_119-Dec-05 14:01 

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.