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

Press enter button get grid item Id

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Berkan
Top achievements
Rank 1
Berkan asked on 28 Nov 2013, 08:47 AM
Hi Telerik,

if,grid item double click,we can show item detail

<ClientSettings EnablePostBackOnRowClick="true" ><br>                                <ClientEvents OnRowDblClick="SelectTab" /><br>                                <Selecting AllowRowSelect="true" /><br>                        </ClientSettings>



 
<script type="text/javascript"><br><br>            function SelectTab() {<br>                var tabStrip = $find("<%= rdDisputeOutputTabStripDetail.ClientID %>");<br>                var tab = tabStrip.findTabByText("Detail");<br>                if (tab) {<br>                    tab.select();<br>                    $('html,body').scrollTop(0);<br>                }<br>            }  <br>        </script>



the same process, the Enter button you want to make a pressure,

I tried this code,

<ClientSettings AllowKeyboardNavigation="true"> <br>                         <ClientEvents OnKeyPress="keyPressed"  /> <br>                          <Selecting AllowRowSelect="true" /><br>                        </ClientSettings> <br>


<script type="text/javascript"><br><br  function keyPressed(sender, args) {<br   if (args.get_keyCode() == 13) {<br  alert("Hello");<brvar e = args.get_domEvent().rawEvent;<br  e.returnValue = false;<br  e.cancelBubble = true;<br><brif (e.stopPropagation) {<br e.preventDefault();<br e.stopPropagation();<br>                    }<br>                }  <br>                            <br>            } <br>    </script



because I could not get ID does not show details,


Thank you for your answer.

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 03 Dec 2013, 07:59 AM
Hi Berkan,

Could you please elaborate a little bit more on your scenario? Are you trying to access a grids' item by ID on key press? Note that you have to somehow indicate the item which you are trying to access.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Berkan
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or