You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
Currently there doesn't seem to be support for the following DataTables feature:
Description:
Use different data for the different data types requested by DataTables (filter, display, type or sort). The property names of the object is the data type the property refers to and the value can defined using an integer, string or function using the same rules as columns.data normally does.
Note that an _ option must be specified. This is the default value to use if you haven't specified a value for the data type requested by DataTables.
//added, but these need to be corrected laterpublicstringColumnField_{ get {return"mDataProp_{0}";}}publicstringColumnFieldDisplay{ get {return"mDataProp_{0}";}}publicstringColumnFieldSort{ get {return"mDataProp_{0}";}}
//addedpublicstringColumnField_{ get {return"columns[{0}][data][_]";}}publicstringColumnFieldSort{ get {return"columns[{0}][data][sort]";}}publicstringColumnFieldDisplay{ get {return"columns[{0}][data][display]";}}
privatestaticIEnumerable<IColumn> ParseColumns(IValueProvidervalues,IRequestNameConventionnames){varcolumns=newList<IColumn>();intcounter=0;while(true){/// for column.data._ field valuevarcolumnField_= values.GetValue(String.Format(names.ColumnField_, counter));string_columnField_=null;Parse<string>(columnField_,out _columnField_);/// for column.data.sort valuevarcolumnFieldSort= values.GetValue(String.Format(names.ColumnFieldSort, counter));string_columnFieldSort=null;Parse<string>(columnFieldSort,out _columnFieldSort);/// Parses Field value.varcolumnField= values.GetValue(String.Format(names.ColumnField, counter));if(_columnField_!=null){columnField=columnField_;}string_columnField=null;if(!Parse<string>(columnField,out _columnField))break;/// line 178/// added extra _columnFieldSort to Column()varcolumn=new Column(_columnName, _columnField, _columnFieldSort , _columnSearchable, _columnSortable, search);
TO TEST
Add new columns to DataTables.AspNet.Samples.Mvc5.BasicIntegration\Models\SampleEntity.cs
publicclassSampleEntity{publicintId{get;set;}///added new fieldspublicintId_sort{get;set;}publicstringId_display{get;set;}publicstringName{get;set;}publicSampleEntity(){}publicSampleEntity(intid,stringname){Id=id;Id_sort=id;// to verify proper column is used Id_display="# = "+ id.ToString();Name=name;}
Currently there doesn't seem to be support for the following DataTables feature:
Description:
Use different data for the different data types requested by DataTables (
filter, display, type or sort
). The property names of the object is the data type the property refers to and the value can defined using an integer, string or function using the same rules as columns.data normally does.Note that an
_
option must be specified. This is the default value to use if you haven't specified a value for the data type requested by DataTables.As an example you might use:
The text was updated successfully, but these errors were encountered: