Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridViewCell set style padding is very slow

$
0
0

Hi,

My app is very slow when i use this part of code (Style.Padding) :

public class MyGridCell:DataGridViewTextBoxCell
{
    .....

    internal protected virtual void UpdateStyle(){
        this.Style.Padding = new Padding(40, 0, 0, 0);
    }

    .......
}

52% of the time of execution is passed in the this.Style.Padding call. When i can optimize this ?

Nota : i use Visual Studio 2012 with C# and .net framework 4.0

Regards,

   Gilles


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>