amespace Sodexo.Entities
{
[MetadataType(typeof(AssetMetaData))]
public partial class Asset
{
}
[DisplayName("Activo")]
public class AssetMetaData
{
public object Id { get; set; }
[DisplayName("Nombre Activo")]
[Required(ErrorMessage = "Este campo es Requerido")]
[Filter(FilterControl="Autocomplete")]
public object Name { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Descripción Activo")]
public object Description { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Marca")]
public object Brand { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Modelo")]
public object Model { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Serial")]
public object Serial { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Ubicación")]
public object Location { get; set; }
[DisplayName("Sucursal")]
public object Branch { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Capacidad")]
public object Capacity { get; set; }
[DisplayName("Tipo de Servicio")]
public object ServiceType { get; set; }
}
}
and check to see if Column is of type MetaForeignKeyColumn? if not then thats your problem the
AutocompleteFilter only works with FKColumns. It should be possible to change things so that it works with any column just as the
Integer Filter works with any none key column.
Hope this helps [:D]
Dynamic DataDynamic Data FuturesAdvanced Filters
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
Hi Levalencia, I've got that Autocomplete on any column working now (I'm calling it
AnyColumnAutocomplete) and will post the artlicle to my blog shortly [:D]
I've had to create a new Filter and modify the AutocompleteFilter Web Service.
Hope this helps [:D]
Dynamic DataDynamic Data FuturesAdvanced FiltersAnyColumnAutoComplete
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
I am using AnyColumnAutocomplete but it doesn't work with numeric column type. I have a table called Budget and the PK is BudgetCode (int). I want the user to be able to type the BudgetCode as a filter but I had no success.
I this a bug or the AnyColumnAutocomplete only support String type columns?
Hi AnyColumnAutoComplete works on the contents of the column it does not reach out over FK relationships but I'm sure that it could be modified to do that [:D]
Dynamic DataAdvanced Filters
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
levalencia
Member
673 Points
325 Posts
Re: ASP.NET Dynamic Data Filtering not working
Sep 08, 2008 02:53 PM|LINK
I have the following problem}
var fkColumn = Column as MetaForeignKeyColumn;
fkcolumn is null
so the autofilter is not working
autoComplete1.ContextKey = AutocompleteFilterService.GetContextKey(fkColumn.ParentTable);
amespace Sodexo.Entities
{
[MetadataType(typeof(AssetMetaData))]
public partial class Asset
{
}
[DisplayName("Activo")]
public class AssetMetaData
{
public object Id { get; set; }
[DisplayName("Nombre Activo")]
[Required(ErrorMessage = "Este campo es Requerido")]
[Filter(FilterControl="Autocomplete")]
public object Name { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Descripción Activo")]
public object Description { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Marca")]
public object Brand { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Modelo")]
public object Model { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Serial")]
public object Serial { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Ubicación")]
public object Location { get; set; }
[DisplayName("Sucursal")]
public object Branch { get; set; }
[Required(ErrorMessage = "Este campo es Requerido")]
[DisplayName("Capacidad")]
public object Capacity { get; set; }
[DisplayName("Tipo de Servicio")]
public object ServiceType { get; set; }
}
}
sjnaughton
All-Star
25698 Points
5169 Posts
MVP
Re: ASP.NET Dynamic Data Filtering not working
Sep 08, 2008 03:10 PM|LINK
Can you debug to that line:
var fkColumn = Column as MetaForeignKeyColumn;
and check to see if Column is of type MetaForeignKeyColumn? if not then thats your problem the AutocompleteFilter only works with FKColumns. It should be possible to change things so that it works with any column just as the Integer Filter works with any none key column.
Hope this helps [:D]
Dynamic Data Dynamic Data Futures Advanced Filters
Always seeking an elegant solution.
levalencia
Member
673 Points
325 Posts
Re: ASP.NET Dynamic Data Filtering not working
Sep 08, 2008 03:16 PM|LINK
That column is not a foreign key, that should be the problem.
The integer filter works, but it shows a dropdownlist, If I have 1000 rows, that will be a problem
I want a text filter or autocomplete filter, so the user can write anything and search for it.
Any ideas please?
sjnaughton
All-Star
25698 Points
5169 Posts
MVP
Re: ASP.NET Dynamic Data Filtering not working
Sep 08, 2008 03:29 PM|LINK
Hi levalencia, I'll look at making the Autocomplete work with any column shouldn't be a problem, I'll have a look right away [:D]
Dynamic Data Dynamic Data Futures Advanced Filters
Always seeking an elegant solution.
levalencia
Member
673 Points
325 Posts
Re: ASP.NET Dynamic Data Filtering not working
Sep 08, 2008 03:43 PM|LINK
You are the best, I will wait here for the solution.
Thank you very much!
sjnaughton
All-Star
25698 Points
5169 Posts
MVP
Re: ASP.NET Dynamic Data Filtering not working
Sep 09, 2008 06:05 PM|LINK
Hi Levalencia, I've got that Autocomplete on any column working now (I'm calling it AnyColumnAutocomplete) and will post the artlicle to my blog shortly [:D]
I've had to create a new Filter and modify the AutocompleteFilter Web Service.
Hope this helps [:D]
Dynamic Data Dynamic Data Futures Advanced Filters AnyColumnAutoComplete
Always seeking an elegant solution.
levalencia
Member
673 Points
325 Posts
Re: ASP.NET Dynamic Data Filtering not working
Sep 09, 2008 06:54 PM|LINK
Please send me a private message when you have published it
Thank you very much.
sjnaughton
All-Star
25698 Points
5169 Posts
MVP
Re: ASP.NET Dynamic Data Filtering not working
Sep 09, 2008 09:52 PM|LINK
Hi Levalencia, here's the post on my blog with project doweload: Part 3 – Creating the AnyColumnAutocomplete filter.
Hope this helps [:D]
Dynamic Data Dynamic Data Futures Advanced Filters AnyColumnAutoComplete
Always seeking an elegant solution.
lucbard
Member
8 Points
11 Posts
Re: ASP.NET Dynamic Data Filtering not working
Dec 16, 2008 07:53 PM|LINK
Hi
I am using AnyColumnAutocomplete but it doesn't work with numeric column type. I have a table called Budget and the PK is BudgetCode (int). I want the user to be able to type the BudgetCode as a filter but I had no success.
I this a bug or the AnyColumnAutocomplete only support String type columns?
Thanks,
Luc
sjnaughton
All-Star
25698 Points
5169 Posts
MVP
Re: ASP.NET Dynamic Data Filtering not working
Dec 17, 2008 10:39 AM|LINK
Hi AnyColumnAutoComplete works on the contents of the column it does not reach out over FK relationships but I'm sure that it could be modified to do that [:D]
Dynamic Data Advanced Filters
Always seeking an elegant solution.