Hi, I have big problem. I need to have application that have grid, which a can control by keyboard(up and down). And if i change position i need to update data in detail view by id. But i have problem. If i set
<ClientSettings enablepostbackonrowclick="false" AllowKeyboardNavigation="true" >
<Selecting AllowRowSelect="True" />
</ClientSettings>
keyboard works well, but detail view isnt updating.
if i set enablepostbackonrowclick="true" AllowKeyboardNavigation="true", keyboard isnt working but by mouse clicking on row detail view is updating well.
IS there resolution for working this two things together?
Thanks. Im have WinXP, framework SP1, Q1 2009
Josef
<ClientSettings enablepostbackonrowclick="false" AllowKeyboardNavigation="true" >
<Selecting AllowRowSelect="True" />
</ClientSettings>
keyboard works well, but detail view isnt updating.
if i set enablepostbackonrowclick="true" AllowKeyboardNavigation="true", keyboard isnt working but by mouse clicking on row detail view is updating well.
IS there resolution for working this two things together?
Thanks. Im have WinXP, framework SP1, Q1 2009
Josef
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainForm.aspx.cs" Inherits="StartProject.MainForm" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager" runat="server"> |
| </asp:ScriptManager> |
| <script type="text/javascript"> |
| function openWin() { |
| var oWnd = radopen("EditForm.aspx", "EditWindow"); |
| } |
| </script> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <ajaxsettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| <telerik:AjaxUpdatedControl ControlID="DetailsView1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </ajaxsettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource" |
| GridLines= "None" width="55%" AllowPaging="True" AllowSorting="True" |
| AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" Skin="Black"> |
| <ClientSettings enablepostbackonrowclick="true" AllowKeyboardNavigation="true" > |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <mastertableview datasourceid="SqlDataSource" AutoGenerateColumns="False" |
| DataKeyNames="dbID" |
| ClientDataKeyNames="dbID" |
| Width="100%" |
| CommandItemDisplay="Bottom" |
| PageSize="50"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn |
| DataField="dbID" |
| HeaderText="dbID" |
| ReadOnly="True" |
| SortExpression="dbID" |
| UniqueName="dbID" DataType="System.Int32"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn |
| UniqueName="dbJmeno" |
| DataField="dbJmeno" |
| HeaderText="dbJmeno" |
| SortExpression="dbJmeno"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn |
| DataField="dbPrijmeni" |
| HeaderText="dbPrijmeni" |
| SortExpression="dbPrijmeni" |
| UniqueName="dbPrijmeni"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn |
| DataField="dbStatus" |
| DataType="System.Int32" |
| HeaderText="dbStatus" |
| SortExpression="dbStatus" |
| UniqueName="dbStatus"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </mastertableview> |
| <clientsettings> |
| <selecting allowrowselect="True" /> |
| <scrolling allowscroll="True" usestaticheaders="True" /> |
| </clientsettings> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
| SelectCommand="SELECT [dbID], [dbJmeno], [dbPrijmeni], [dbStatus] FROM [tabKlienti]"> |
| </asp:SqlDataSource> |
| <telerik:RadWindowManager showID="RadWindowManager" runat="server" ShowContentDuringLoad="false" |
| VisibleStatusbar="false" ReloadOnShow="true"> |
| <windows> |
| <telerik:RadWindow |
| ID="EditWindow" |
| Width="285px" |
| Height="265px" |
| NavigateUrl="EditForm.aspx"> |
| </telerik:RadWindow> |
| </windows> |
| </telerik:RadWindowManager> |
| <button onclick="openWin(); return false;"> |
| Open Edit form</button> |
| <br /> |
| <div style="margin-left: 440px"> |
| </div> |
| <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" |
| DataSourceID="SqlDataSource1" Height="50px" Width="125px"> |
| <Fields> |
| <asp:BoundField DataField="dbMistoNarozeni" HeaderText="dbMistoNarozeni" |
| SortExpression="dbMistoNarozeni" /> |
| <asp:BoundField DataField="dbOkresNarozeni" HeaderText="dbOkresNarozeni" |
| SortExpression="dbOkresNarozeni" /> |
| <asp:BoundField DataField="dbNarodnost" HeaderText="dbNarodnost" |
| SortExpression="dbNarodnost" /> |
| <asp:BoundField DataField="dbTypDuchodu" HeaderText="dbTypDuchodu" |
| SortExpression="dbTypDuchodu" /> |
| <asp:BoundField DataField="dbPobytNastoupilDatum" |
| HeaderText="dbPobytNastoupilDatum" SortExpression="dbPobytNastoupilDatum" /> |
| <asp:BoundField DataField="dbOPCislo" HeaderText="dbOPCislo" |
| SortExpression="dbOPCislo" /> |
| </Fields> |
| </asp:DetailsView> |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
| SelectCommand="SELECT [dbMistoNarozeni], [dbOkresNarozeni], [dbNarodnost], [dbTypDuchodu], [dbPobytNastoupilDatum], [dbOPCislo] FROM [tabKlienti] WHERE ([dbID] = @dbID)"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="RadGrid1" DefaultValue="1" Name="dbID" |
| PropertyName="SelectedValue" Type="String" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| </form> |
| </body> |
| </html> |