This question is locked. New answers and comments are not allowed.
I am starting this new thread because the one I wrote before is for an old version.
I am currently using v2010.q3. I have a problem when using custom properties in my model and a linq source to feed the grid.
Seems the grid is using that properties to build the Linq query, but as they are custom, it crashes with
"The specified type member 'CustomModelProperty' is not supported..." etc.
Sample code: Add a custom property on the model, like
The only workaround I found was to convert the query to a list on the controller, ie,
If I don't, it crashes. It works fine for a small numbe of rows, but I lose the capability of dynamic Sql Filtering using the grid.
Any ideas or workarounds? Am I doing something wrong?
I am currently using v2010.q3. I have a problem when using custom properties in my model and a linq source to feed the grid.
Seems the grid is using that properties to build the Linq query, but as they are custom, it crashes with
"The specified type member 'CustomModelProperty' is not supported..." etc.
Sample code: Add a custom property on the model, like
public
partial
class
SIN_PROCESOENCUESTA
{
[ScaffoldColumn(
false
)]
public
string
_Mes
{
get
{
return
CultureInfo.CurrentCulture.DateTimeFormat.GetMonthNamePRE_MES).Capitalize();
}
}
}
The only workaround I found was to convert the query to a list on the controller, ie,
public
class
SIN_ProcesoEncuestaController : Controller
{
IndiceIndustriaEntities IIE =
new
IndiceIndustriaEntities();
public
ActionResult Admin()
{
return
View(IIE.SIN_PROCESOENCUESTA.ToList());
}
}
If I don't, it crashes. It works fine for a small numbe of rows, but I lose the capability of dynamic Sql Filtering using the grid.
Any ideas or workarounds? Am I doing something wrong?