Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Performance issue in Ultragrid with UltraFormattedlinklabel embbeded in
posted

Taking more time in set value for UltraFormattedLinkLabel with HTML mixed text when initializing Grid row.

there are 4552 rows with 9022 calls taking 9167ms. please check the attached callstack screenshot. 

 The following piece of code in initializing Grid row event of ultra grid:-

            if (!string.IsNullOrEmpty(oInfoItem.SummaryText))
            {               
                lnkLabelItemSummary.AutoSize = true;
                lnkLabelItemSummary.MaximumSize = new System.Drawing.Size(this.ClientSize.Width - 50, Int32.MaxValue);
                lnkLabelItemSummary.Appearance.ForeColor = Color.Black;
                lnkLabelItemSummary.Location = new Point(0, lnkItemTitle.Height + lnkItemSummary.Height + 1);
                lnkLabelItemSummary.Font = new Font(FontType, 10.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));               
                lnkLabelItemSummary.Padding = new System.Drawing.Size(2, 2);
            
                lnkLabelItemSummary.Value = oInfoItem.SummaryText; 
               
                //lnkLabelItemSummary.Size = new System.Drawing.Size(this.ClientSize.Width - 50, ResizeSummaryHeight(lnkLabelItemSummary.Text));
                lnkLabelItemSummary.AutoScrollOffset = new Point(0, 0);
                lnkLabelItemSummary.ScrollBarDisplayStyle = Infragistics.Win.UltraWinScrollBar.ScrollBarDisplayStyle.Never;
                grdSearchResults.DisplayLayout.Override.RowSizing = RowSizing.Fixed;
                grdItemResults.DisplayLayout.Override.RowSizing = RowSizing.Fixed;
            }
Parents
  • 469350
    Offline posted

    Hi Ravi,

    I'm having trouble understand what this code is doing. You are setting the Value of a FormattedLinkLabel control inside of the InitializeRow event of the grid? InitializeRow fires whenever a grid row is created or whenever a value in that row changes. So setting the value of a property on a standalone control of any kind inside that event doesn't make a lot of sense. You would be setting the value on the standalone control every time a new row in the grid is initialized, so that value in the control would be totally arbitrary and just be essentially random based on the last row that was created or modified in the grid.

    It also doesn't make sense to set property on the DisplayLayout.Override inside of InitializeRow as you would be continuously setting and re-setting the same value on the same property potentially thousands of times for no reason.

    Can you please provide more context about what you are trying to achieve here and how you are doing it? Maybe include a small sample project demonstrating the issue, if you can.

Reply Children
No Data