Wrapping a DataGrid

Discussion in 'ASP .Net Building Controls' started by Sergio Florez M., Dec 7, 2004.

  1. I'm trying to wrap a datagrid inside another control, so Basically I expose
    a few of its properties like this:

    public int PageSize
    {
    get
    {
    EnsureChildControls();
    return gridDatos.PageSize;
    }
    set
    {
    EnsureChildControls();
    gridDatos.PageSize = value;
    }
    }

    My problem is that this doesn't work with the Columns collection so I tried
    it like this:

    private DataGridColumnCollection _columns;
    public DataGridColumnCollection Columns
    {
    set
    {
    _columns = value;
    }
    get
    {
    return _columns;
    }
    }

    But this didn't work either. I get this error:

    Compilation Error
    Description: An error occurred during the compilation of a resource required
    to service this request. Please review the following specific error details
    and modify your source code appropriately.

    Compiler Error Message: CS1501: No overload for method
    'DataGridColumnCollection' takes '0' arguments

    Help please!!
     
    Sergio Florez M., Dec 7, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.