This is a migrated thread and some comments may be shown as answers.

Two bugs... see details on post

2 Answers 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fabien
Top achievements
Rank 2
Fabien asked on 01 Dec 2008, 09:35 AM
Hi Telerik guys :)

I found two bugs on unbound mode. Let me explain how to repeat the bugs on the code sample that I provide to you.

I'm on unbound mode, I have some group by expressions. After edit on cell, I need to update columns in the same row and the sum in the header of the group by expression.

First Bug
 On constructor, you can find :
            //this.RadGridView_Volumes.SelectionMode = GridViewSelectionMode.CellSelect;

Uncomment it and you will understand :)
Because, when you double click on the 'group by' line to collapse or expand it.... CRASH! :p

Second Bug
on CellEndEdit event, look at :
            this.RadGridView_Volumes.SuspendLayout();
            this.RadGridView_Volumes.GridElement.BeginUpdate();

            // Update something... anyway the problem is not here :)

            this.RadGridView_Volumes.GridElement.EndUpdate();
            // Second bug
            //this.RadGridView_Volumes.MasterGridViewTemplate.BestFitColumns();
            this.RadGridView_Volumes.ResumeLayout();

Go on Value column and just begin edit of a cell. Click on other cell and application will crash. (uncomment line before)



The best fit columns provoque an error on BaseGridBehavior.
function : SetCurrentPosition in if (row.IsCurrent && row.RowInfo == this.GridControl.OldCurrentRow) 

why? simple,

line 1191 : protected virtual bool OnMouseDownLeft(MouseEventArgs e)
line 1218 : GridCellElement cell = this.GetCellAtPoint(elementUnderMouse);
sounds good, but cell is null. so,
            if (cell != null)
            {
                row = cell.RowElement;
            }
            else
            {
                row = this.GetRowAtPoint(elementUnderMouse); <--- comes here
            }

            bool rowChanged = false;
            if (Cursor.Current != Cursors.SizeNS)
            {
                rowChanged = SetCurrentPosition(row, cell); <-- crash on it
            }

     row is null two...



So, I'm agree with the fact that it's my own fault, because If I call the best fit after end edit, your function is not able to find cell...
but I suppose that you can add some try catch or test :)



You can use (change dll references of course), I use Q3 dll of Forms

Thanks for your efforts :)


Sample application here



2 Answers, 1 is accepted

Sort by
0
Fabien
Top achievements
Rank 2
answered on 01 Dec 2008, 10:17 AM
Re,

for the second bug,
this.GRIDVIEWOBJECT.GridElement.BeginUpdate();
and
this.GRIDVIEWOBJECT.SuspendLayout();
should be commented too.

Best regards,

Fabien


0
Accepted
Martin Vasilev
Telerik team
answered on 03 Dec 2008, 09:55 PM
Hello Fabien,

Thank you for the bug reporting.

We have already fixed the described issues and they will be available in the upcoming Q3 2008 Service Pack1.

I have updated your Telerik points for bringing this to our attention. Contact me again, if you have other questions.

Sincerely yours,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Fabien
Top achievements
Rank 2
Answers by
Fabien
Top achievements
Rank 2
Martin Vasilev
Telerik team
Share this question
or