|
I have a datagrid view, I have list of custom objects and i have assigned that to BindingSource Object. Now i bounded the DataGridView.DataSource property to the BindingSource.
I place my grid in the split container panel1 and panel2 contains another user defined user control. Now if i am changing the width of the split container(using mouse). That last row of the datagridview in panel1 is getting repeated. Here we are unable to move the cursor to the last repeating row.
Options tried:
I have tried the DataGridView.Invalidate() and DataGridView.Refresh() etc. but both are didnt worked.
Please give me the solution for this.
Thanks, Durga Prasad P.V. pvdp- Moved byeryangMSFTWednesday, September 02, 2009 3:04 AM (From:.NET Base Class Library)
-
|
| durga prasad p.v_ Monday, August 31, 2009 9:51 AM |
Hi Durga Prasad, >That last row of the datagridview in panel1 is getting repeated. I am not quite understand this description. When I test it on my computer, I put a DataGridView into a SplitContainer, set DataGridView's Dock property to "Fill", add several columns and rows into DataGridView, and chang split location in run time. It all works properly. Could you please post a screen shot? That will help to make the question clearly. Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't. |
| Kira Qian Wednesday, September 02, 2009 8:16 AM |
Initially
The above image shows when it was directly loaded. After that user manually adjusted the split container and we are changing the width of the data grid. Please go through the second image.
After-Resize; http://i30.tinypic.com/fawq44.jpg
Regards, Durga Prasad P.V.
pvdp |
| durga prasad p.v_ Wednesday, September 02, 2009 9:31 AM |
Hi Durga Prasad, Thank you for the screen shot. It can be seen from the picture that after resize, the last row repeat the row whose second cell text is "IS-Expenses Breakup 6". First I want to know whether it is a standard DataGridView. It seems you have beautified the look of it. How do you customize the look? Does it a third-part control? Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't. |
| Kira Qian Wednesday, September 02, 2009 9:42 AM |
Thanks for the quick reply.
It is standard grid view only. I have just changed the Look and feel of that.
By the way let me discuss the entire UI Desing.
Here we need to Render Multiple Data Grid Views side by side(we dont show each datagrid h.scrollbar and v.scrollbar).
So In the split container panel1 we have pasted the tab control.
On each tab page we havea split container: Panel1 contains: a flow lay out panel, each flow layout panel contains the array of the datagridviews. Panel2 contains: a scroll bar control.
On moving the scroll bar we are moving the all the grids that are under single tab page.
So the problem of last row repeating is coming from resizing.
Regards, Durga Prasad P.V. pvdp |
| durga prasad p.v_ Wednesday, September 02, 2009 9:51 AM |
Hi Durga Prasad, I understand your project and the UI design. But what confused me is the repeated row is so clear that it looks like a normal row, it doesn't seem caused by custom draw. Do you use binding? When resizing, does the datasource have that repeated row? Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't. |
| Kira Qian Thursday, September 03, 2009 2:59 AM |
Yes i am using the Data Binding. When resizing DataSource didnt have the repeated row.
Regards, Durga Prasad P.V. pvdp |
| durga prasad p.v_ Tuesday, September 08, 2009 4:54 AM |