Hi,
We have the following code in the aspx file to enable ajax page post back when clicked on a button or a check box is checked to fetch results for the grid based on the criteria given in the text box.
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyCustomerPage" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnSearch"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" LoadingPanelID="RadAjaxLoadingPanelCustomer" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="chkIncludeDeprecated"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" LoadingPanelID="RadAjaxLoadingPanelCustomer" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelCustomer" runat="server"Skin="Default" InitialDelayTime="200" MinDisplayTime="300"> </telerik:RadAjaxLoadingPanel>In the above code, after the part
<telerik:AjaxSetting AjaxControlID="btnSearch"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="CustomerGrid" UpdatePanelHeight="" LoadingPanelID="RadAjaxLoadingPanelCustomer" /> </UpdatedControls> </telerik:AjaxSetting>was added, the submit button no longer appears as a submit button (<input type="submit"/>) but a normal button(<input type="button"/>) rendered to the page. As a result after the user enters a text in the search criteria and hits the enter key the page is not submitted, until the user clicks the button.
Can somone help what could we be missing in the code while we configured ajax action for the button, that it lost the submit behavour.
Thanks,
Manoj
Hi,
how can I rebind my detailtable on client-side? I initially bind it though the OnDetailTableDataBind event. After adding/editing/deleting a row in the detailtable i would like to show the updated data. I tried to call the rebind function for the mastertableview but it didn't worked. Also i tried to play around with the get_detailTables() function but i' not sure how to iterate through the collection and call the rebind function. Can you point me a solution of this problem?
TIA,
Rafal
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("excelExport") > 0) { args.set_enableAjax(false); } } function ShowInsertForm() { var combo = $find("<%= RadComboBox1.ClientID %>"); var comboItem = combo.get_selectedItem(); if (!comboItem) { window.radopen("AddComment.aspx", "UserListDialog"); } else { window.radopen("AddComment.aspx?something=" + comboItem.get_value("something"), "UserListDialog"); } return false; } function refreshGrid() { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); } </script><telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="WebBlue" OnNeedDataSource="RadGrid1_NeedDataSource" OnDataBound="RadGrid1_DataBound" width="873px" AutoGenerateColumns="False"> <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true"> <Excel Format="ExcelML" /> </ExportSettings> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> </ClientSettings> <MasterTableView CommandItemDisplay="Top" > <CommandItemSettings > </CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="something0" HeaderText="Grantee" UniqueName="column"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="something" HeaderText="PO" UniqueName="column1"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="something1" FilterControlWidth="30px" HeaderText="Comment Date" UniqueName="column2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="something2" HeaderText="Commentor" UniqueName="column3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="something3" HeaderText="Comment" UniqueName="column4"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InsertDate" FilterControlWidth="30px" HeaderText="Insert Date" UniqueName="something4"> </telerik:GridBoundColumn> </Columns> <CommandItemTemplate> <a href="#" onclick="return ShowInsertForm();">Add New Record</a> <asp:ImageButton ID="excelExport" runat="server" ImageUrl="~/images/ExportToExcel.gif" CommandName="ExportToExcel" /> </CommandItemTemplate> </MasterTableView> </telerik:RadGrid>
<telerik:RadGrid ID="rggrupos" DataSourceID="dsGrupos" runat="server"
AutoGenerateColumns="False" GridLines="none"> <MasterTableView Width="100%"> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldAlias="Grupo" FieldName="grupo"></telerik:GridGroupByField> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="grupo" SortOrder="Ascending"></telerik:GridGroupByField> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridBoundColumn SortExpression="usuario" HeaderText="" HeaderButtonType="TextButton" DataField="usuario"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="temprespseg" HeaderText="RESPSEG" > <ItemTemplate> <asp:CheckBox ID="chkrespseg" runat="server" onclick="Check(this);" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="tempatender" HeaderText="ATENDER" > <ItemTemplate> <asp:CheckBox ID="chkatender" runat="server" onclick="Check(this);" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="tempcomentar" HeaderText="COMENTAR" > <ItemTemplate> <asp:CheckBox ID="chkcomentar" runat="server" onclick="Check(this);" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="tempenterar" HeaderText="ENTERAR" > <ItemTemplate> <asp:CheckBox ID="chkenterar" runat="server" onclick="Check(this);" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="temparchivar" HeaderText="ARCHIVAR" > <ItemTemplate> <asp:CheckBox ID="chkarchivar" runat="server" onclick="Check(this);" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid><asp:LinqDataSource ID="VendorDataSource" EnableObjectTracking="true" EnableUpdate="true" runat="server" ContextTypeName="admin.MTSDataClassesDataContext" EntityTypeName="" TableName="Vendors"></asp:LinqDataSource><asp:LinqDataSource ID="VendorDetailsDataSource" EnableUpdate="true" runat="server" ContextTypeName="admin.MTSDataClassesDataContext" EntityTypeName="" Select="new (ID, Description, Address1, Address2, City, Email2, Phone, FAX, Mobile, Zip, StateID, CountryID, Country, State)" Where="ID==@ID" TableName="Vendors"> <SelectParameters> <asp:Parameter Name="ID" Type="Int32" /> </SelectParameters></asp:LinqDataSource><NestedViewSettings DataSourceID="VendorDetailsDataSource"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="ID" MasterKeyField="ID" /> </ParentTableRelation></NestedViewSettings><MasterTableView AllowAutomaticUpdates="true" DataKeyNames="ID" DataSourceID="VendorDataSource">