Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private void dgvResult_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
        {
            try
            {

                if (e.RowIndex > -1)
                {
                    if (e.ColumnIndex != -1)
                    {
                        e.Paint(e.CellBounds, DataGridViewPaintParts.All);

                        using (Pen p = new Pen(Color.Black))
                        {
                            cellImage(sender, e);
                            e.Graphics.DrawLine(p, e.CellBounds.X, e.CellBounds.Top-22, e.CellBounds.X, e.CellBounds.Bottom-1);
                            e.Graphics.DrawLine(p, e.CellBounds.Left - 100, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
                        }
                        e.Handled = true;
                    }
                }
            }



using this code label is loading every time.when am scrolling it was loaded how to avoid without painting.
in the am adding label image and label in one cell in grid view in asp.net its easy using temples field but here
how to i design .
please help me?
pavan
Posted
Updated 29-Jul-11 1:56am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900