errors in work gridview grouping

2 posts, 0 answers
  1. Fier
    Fier avatar
    3 posts
    Member since:
    Nov 2012

    Posted 12 Dec 2012 Link to this post

     private void gvFiles_RowFormatting(Object sender, RowFormattingEventArgs e)
                if (e.RowElement.RowInfo is GridViewDataRowInfo)
                    //mandatory conditions
                    if ((string)e.RowElement.RowInfo.Cells["OrderPay"].Value == "1" && e.RowElement.RowInfo.Cells["FID"].Value == DBNull.Value)
                        //if the "Extended" nothing is written
                        if (e.RowElement.RowInfo.Cells["Extended"].Value.Equals(DBNull.Value))
                            //then to the current date add 14 days and to compare the date in "DateEnd".
                            if (DateTime.Now.AddDays(Properties.Settings.Default.WarningDays) >= Convert.ToDateTime(e.RowElement.RowInfo.Cells["DateEnd"].Value))
                                //if it is greater than or equal, display a red line.
                                e.RowElement.ForeColor = Color.Red;
                        } //otherwise, if the "Extended" is not equal to zero
                        else if (!e.RowElement.RowInfo.Cells["Extended"].Value.Equals(DBNull.Value))
                            //then compare with segdonyashney date have "Extended" and "DateEnd".
                            if (DateTime.Now.AddDays(Properties.Settings.Default.WarningDays) >= Convert.ToDateTime(e.RowElement.RowInfo.Cells["DateEnd"].Value) &&
                                DateTime.Now.AddDays(Properties.Settings.Default.WarningDays) >= Convert.ToDateTime(e.RowElement.RowInfo.Cells["Extended"].Value))
                                e.RowElement.ForeColor = Color.Red;
                            e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
                        e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);

    It works.
    But when you press the grouping and gruppiruesh on a particular column, it starts to produce the correct lines in red and those that it should be allocated.
    Moreover, hide and reveal to the grouping and each time he paints in red color different rows.

    And more.
    In the GridView I have built a hierarchy. After grouping near the rows, press the + to see the subitems, instead udlenit write down, it hides all the items below. Shown.

    1 - Normal GridView
    2 - After grouping the first element is painted red, although it should not be released under the terms of
    3 - If during the press groups see subitems, then the rows disappear from the bottom somewhere O_O
  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 15 Dec 2012 Link to this post

    Hi Fier,

    Before being able to assist you, we would kindly ask you to check your thread "Print Document" and address the questions that we asked there. This will allow us to continue supporting your enquiries.

    Kind regards,
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top