This is a migrated thread and some comments may be shown as answers.

Grid Column FIlterable Format fails after first detail row

2 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 15 Oct 2013, 06:19 PM
I have a series of master details rows in a grid. In the detail of the master grid is a tab group. The detail grids are inside the individual tabs.

I am trying to format the display of an integer (4 digit year) inside the filter column. Removing the comma.

Here is the detail grid .csthml snippet.
        columns.Bound(s => s.SurveyYear).Filterable(f => f.UI("yearFilterFormatSurvey")).Width(85);
 
<script id="yearFilterFormatSurvey" type="text/javascript">
 
    function yearFilterFormatSurvey(element) {
 
        element.kendoNumericTextBox({
            format: 'n0',
            decimals: 0,
        });
 
    }
 
</script>
The problem is that after the first detail row the formatting is no longer applied.

Also I am unable to move the format code to a .js file? I can't move it to any other .cshtml file either. Many of the detail grids have this column and having to put this filter format code into each of their .cshtml files is pretty "code smelly".

I am running the latest released build. 2013.2.918

Thanks,

Trav

2 Answers, 1 is accepted

Sort by
0
Travis
Top achievements
Rank 1
answered on 15 Oct 2013, 06:35 PM
I have fixed my problem. I changed my format to "####" to get what I want.

Why does n0 work on the first row but not the following rows? Perhaps a difference between .net/json/jquery string formats?
0
Rosen
Telerik team
answered on 17 Oct 2013, 07:57 AM
Hello Travis,

I'm afraid that I'm unable to recreate such behavior locally. Could you provide a small runnable sample in which this issue can be observed. This will allow us to get better understanding about your exact implementation and scenario and provide you with more to the point answer.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Travis
Top achievements
Rank 1
Answers by
Travis
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or