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

[Solved] tab

6 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Behtash Moradi
Top achievements
Rank 1
Behtash Moradi asked on 29 Aug 2011, 08:05 AM
have problem with  tab key on Telerik grid when it is in batch editing mode,After editing cell and pressing tab key, it doesn't focus on next column of grid.
and if you click on another cell (mouse click). data in last-edited column  disappeared .  It seems there is an hot fix for this case in following URL

http://www.telerik.com/help/aspnet-mvc/getting-started-installation-instructions.html

which we should download
Telerik_Extensions_for_ASPNET_MVC_2011_2_822.zip  file, but there is no such file in that  page. the lastest  patch there is
Telerik_Extensions_for_ASPNET_MVC_2011_2_818.zip please let me know how I can download this.

please advise

Thanks
Behtash Moradi

6 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 29 Aug 2011, 11:14 AM
Hi Behtash,

Did you enable the Keyboard Navigation support in the grid? You can test its behavior here

Greetings,
Georgi Tunev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Behtash Moradi
Top achievements
Rank 1
answered on 30 Aug 2011, 12:47 AM
Great, Thanks
But I still have another problem. I want to format text in cell after editing when the tab key  move the focus to next  cell.
for example, user enter 2 and It should be re-formated to '02:00', but the  blur event doesn't occur on Tab key press.How I can
determine that the 'Tab' key has been press.
FYI: I already tried with keypress,keydown and key up but none of them capture the 'Tab' key .

Please advise
Thanks
Behtash  Moradi
0
Georgi Tunev
Telerik team
answered on 30 Aug 2011, 11:07 AM
Hello Behtash,

In scenario like yours I would suggest to use numeric textbox like shown here:
http://demos.telerik.com/aspnet-mvc/grid/serveredittemplates
http://demos.telerik.com/aspnet-mvc/grid/clientedittemplates

Greetings,
Georgi Tunev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Behtash Moradi
Top achievements
Rank 1
answered on 30 Aug 2011, 11:51 AM
You didn't catch my question correctly
1)I want it in batch edit mode 
2)the text box should accept only time format(02:09) not number
Thanks
Behtash Moradi
0
Georgi Tunev
Telerik team
answered on 31 Aug 2011, 11:05 AM
Hello again Behtash,

Sorry for the misunderstanding - I meant TimePicker. For example, if you examine the batch editing demo, all you need to do is to enable its keyboard navigation feature (.KeyboardNavigation()). The demo uses numeric textboxes, which you could replace with a time picker with a predefined format set ( .Format("HH:mm")) and with a disabled button ( .ShowButton(false))

This way, you will not have to add key logging logic in order to replace the value in the box with a custom formatted one.

Regards,
Georgi Tunev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Behtash Moradi
Top achievements
Rank 1
answered on 01 Sep 2011, 12:54 AM
I already use Format("{0:HH:mm}") but it doesn't work properly. it accepts invalid text.for example 2:XXX
and many other crap data. I have to use JQuery in order to keep it with right formatting
please advise
Thanks
Behtash Moradi
=========================================================================
You may see how I have utilized the grid:

@(Html.Telerik().Grid(Model.TimeSheets)
          .Name("Grid")
          .Columns(columns =>
                       {
                           columns.Bound(o => o.TaskName).Width(250).FooterTemplate(@<text>Summary</text>); ;
                           columns.Bound(o => o.Monday).Format("{0:HH:mm}").Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Monday).Format("{0:HH:mm}").Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Tuesday).Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Wed).Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Thursday).Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Friday).Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Saturday).Width(20).FooterTemplate(@<text>0</text>); ;
                           columns.Bound(o => o.Sunday).Width(20).FooterTemplate(@<text>0</text>);
                       })
                       .DataBinding(dataBinding =>
                        dataBinding.Ajax()
                            .Select("Select", "Home")
                            .Update("Update", "Home")
                        )
                       .DataKeys(keys =>
                                    {
                                        keys.Add(p => p.TaskName);
                                    }).Editable(editing => editing.Mode(GridEditMode.InCell)).ToolBar(commands =>
                        {
                            commands.Insert();
                            commands.SubmitChanges();
                        }).KeyboardNavigation()
                                       )
=============================================================================
Tags
Grid
Asked by
Behtash Moradi
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Behtash Moradi
Top achievements
Rank 1
Share this question
or