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

Prevent Postback

3 Answers 1078 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mugdha Aditya
Top achievements
Rank 1
Mugdha Aditya asked on 17 Mar 2010, 02:13 PM
i have nested  grid, after cliking on row or paging or sorting..it postbacks the page
i dnt want to post back

how i will do tht??
its urgent :(
my code is as below :

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1">

 

 

</telerik:AjaxUpdatedControl>

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="True"

 

 

AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" GridLines="None"

 

 

OnItemCreated="RadGrid1_ItemCreated" MasterTableView-AllowMultiColumnSorting="false"

 

 

OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

OnPageIndexChanged="RadGrid1_PageIndexChanged" OnSortCommand="RadGrid1_SortCommand">

 

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

 

<MasterTableView DataKeyNames="IssueID" AllowMultiColumnSorting="true" GroupLoadMode="Server">

 

 

<NestedViewTemplate>

 

 

<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">

 

 

<telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="ViewIssue" PageViewID="PageView1">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">

 

 

<telerik:RadPageView runat="server" ID="PageView1">

 

 

<telerik:RadGrid runat="server" ID="OrdersGrid" AutoGenerateColumns="False" AllowMultiRowSelection="False">

 

 

<MasterTableView ShowHeader="true" AutoGenerateColumns="False" HierarchyLoadMode="ServerOnDemand">

 

 

<NoRecordsTemplate>

 

Records Not Found

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridNumericColumn SortExpression="Description" HeaderText="Description"

 

 

HeaderButtonType="TextButton" DataField="Description" UniqueName="Description">

 

 

</telerik:GridNumericColumn>

 

 

<telerik:GridBoundColumn SortExpression="CSTComments" HeaderText="CSTComments" HeaderButtonType="TextButton"

 

 

DataField="CSTComments" UniqueName="CSTComments" Aggregate="Count">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn SortExpression="AnalystComments" HeaderText="AnalystComments"

 

 

HeaderButtonType="TextButton" DataField="AnalystComments" UniqueName="AnalystComments">

 

 

</telerik:GridDateTimeColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</asp:Panel>

 

 

</NestedViewTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn SortExpression="CoName" HeaderText="CoName" HeaderButtonType="TextButton"

 

 

DataField="CoName" UniqueName="CoName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="ScenarioName" HeaderText="ScenarioName"

 

 

HeaderButtonType="TextButton" DataField="ScenarioName" UniqueName="ScenarioName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Subject" HeaderText="Subject" HeaderButtonType="TextButton"

 

 

DataField="Subject" UniqueName="Subject">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="IssueDate" HeaderText="IssueDate" HeaderButtonType="TextButton"

 

 

DataField="IssueDate" UniqueName="IssueDate">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowDragToGroup="true" />

 

 

</telerik:RadGrid>

 

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 19 Mar 2010, 07:26 AM
Hi Mugdha,

In order to prevent the grid from posting back to the server on row click, juse set its ClientSettings.EnablePostBackOnRowClick property to false.

As for sorting and paging, I am afraid you cannot prevent the grid from doing a post-back or an ajax request as it needs to rebind itself in order for those operations to be completed. You can use ajax to achieve a seamless updating of the user interface by wrapping the grid in a RadAjaxPanel or using the RadAjaxManager control.

I hope this information helps.

Regards,
Tsvetoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mugdha Aditya
Top achievements
Rank 1
answered on 19 Mar 2010, 02:21 PM
Hello Tsvetoslav ,

thanks for your reply... i want to display progress bar while postback
how to show that. plz help me fr tht :(
0
Tsvetoslav
Telerik team
answered on 22 Mar 2010, 04:08 PM
Hello Mugdha,

I think our RadAjaxLoadingPanel control is exactly what you need for this requirement. Here are some online examples:
http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/transparency/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/loadingimages/defaultcs.aspx

Best wishes,
Tsvetoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Mugdha Aditya
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Mugdha Aditya
Top achievements
Rank 1
Share this question
or