Home Forums WinForms controls Xceed Grid for WinForms Bloating designer generated code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14041 |

    The code that is generated for the grid is waaay too long. It generates about 500 private variables in the form, but I have only one grid with 14 columns with a grouprow, columnmanagerrow and a rowtemplate. At the beginning the line count of the generated partial class was 600, later 1400. So it is increasing continuously. I use VC# 2005 Express Beta2 at the moment.
    Is this phenomenon known? How can I avoid it? It makes the developer tool slower too.
    DataGridView and other controls are handled properly, they generate perfect code. So I don’t think it is a bug of the developer tool. Please help.
    Thanks

    Imported from legacy forums. Posted by szinkopa (had 2390 views)

    User (Old forums)
    Member
    Post count: 23064

    The GridControl generates a lot of code, if you use the designer. I’ve had this problem too, and to solve it, I didn’t use the designer: I initialized and added the GridControl in code. You get a lot of private variables, because a variable is created for each element in the GridControl: 1 for each row (DataRowTemplate, InsertionRow, …), 1 for each column, 1 for each cell in the DataRowTemplate, 1 for each cell in the InsertionRow, 1 for each cell in the ColumnManagerRow, …

    Imported from legacy forums. Posted by Tommy (had 247 views)

    User (Old forums)
    Member
    Post count: 23064

    Ok, this would not be a problem, but I get 500 private variable for my 14-column grid. At most it should be 50 only. As I said at the beginning when I drop the grid on the form everything is allright. But later it bloats to 500 and it would bloat even further if I had not recreate it. I don’t know why this happens, I just set some property and reorder the columns.
    It declares the same variable many times with an index at the end: col, col1, col2, col3, col4, …
    It’s quite abnormal.

    Regards

    Imported from legacy forums. Posted by szinkopa (had 3519 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.