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

Generate the grid name

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Farid
Top achievements
Rank 1
Farid asked on 18 Jun 2013, 09:43 AM
Hello,

I have a grid detail , i want to generate the name of the grid with a date .  How can i generate the name of the grid like this : 
"#= kendo.toString(Timestamp,  'dd_MM_yyyy_hh_mm_ss') #"

Thanks

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 20 Jun 2013, 10:00 AM
Hi Farid,

 
Basically using function to generate the Grid name is not supported out-of-the-box and you should implement this functionality using custom code. For example you can generate the Grid name using global variable which to contain the already formatted date:

<script type="text/javascript">
    var date = new Date();
    var format = 'dd_mm_yyyy';
    date = kendo.toString(date, format);
</script>
<script type="text/kendo" id="OrderDetailsTemplate">
  @(Html.Kendo().Grid<OrderDetailViewModel>()
        .Name("OrderDetails_#=date#")
Kind Regards,
Vladimir Iliev
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
Farid
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or