AD
Administrator
Syncfusion Team
June 28, 2006 04:13 PM UTC
Hi Rajani,
To draw the Image with Right align in a textbox cell, You need to handle the TableControlDrawCell event. Here is a code snippet.
if(e.Inner.RowIndex > 0 && e.Inner.ColIndex == 2)
{
Point pt = new Point(e.Inner.Bounds.X + e.Inner.Bounds.Width - img.Size.Width , e.Inner.Bounds.Y );
Rectangle RightRect = new Rectangle( pt,img.Size);
e.Inner.Renderer.Draw(e.Inner.Graphics,e.Inner.Bounds,e.Inner.RowIndex,e.Inner.ColIndex,e.Inner.Style);
e.Inner.Graphics.DrawImage(img,RightRect);
e.Inner.Cancel = true;
}
}
Here is a sample.
http://www.syncfusion.com/Support/user/uploads/ImageTextBoxwithAlignment_626e184f.zip
Let me know if this helps.
Best Regards,
Haneef