Wrapping a DataGrid

  • Thread starter Sergio Florez M.
  • Start date
S

Sergio Florez M.

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!!
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top