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

Radgrid postback issue

1 Answer 64 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
Dayana Maliyakal
Top achievements
Rank 1
Dayana Maliyakal asked on 19 Nov 2010, 05:55 AM
Hello Telerik Team,
    I have a RadGrid with RadComboBox as GridTemplateColumn.Its property autopostback is true.When working onselectedindexchanged property of RadComboBox, how can we avoid its postback ?

The code is like as follows.


<

 

telerik:GridTemplateColumn HeaderText="QTY" SortExpression="quantity" >

 

 

<ItemTemplate>

 

 

<label><%#Eval("quantity")%></label></ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadNumericTextBox ID="rntUQuantity" runat="server" NumberFormat-KeepNotRoundedValue="true"

 

 

Width="65%" Value='<%#Convert.ToDouble(Eval("UQuantity")) %>'>

 

 

<NumberFormat GroupSeparator="," DecimalDigits="3"></NumberFormat>

 

 

</telerik:RadNumericTextBox>

 

 

<telerik:RadComboBox ID="rUM" DataTextField="UM" DataValueField="UMID"

 

 

runat="server" AutoPostBack="true"

 

 

Width="35%" DataSource='<%#UOM%>'

 

 

onselectedindexchanged="rUM_SelectedIndexChanged">

 

 

</telerik:RadComboBox>

 

 

<asp:HiddenField ID="hdUOM" Value='<%#Eval("UMID")%>' runat="server" />

 

 

</EditItemTemplate>

 

 

<HeaderStyle Width="13%" Wrap="false" HorizontalAlign="Right" />

 

 

<ItemStyle Width="13%" Wrap="false" HorizontalAlign="Right" />

 

 

</telerik:GridTemplateColumn>

 


Waiting for the reply
        

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Nov 2010, 10:36 AM
Hello Dayana,

Note that the SelectedIndexChanged event does not fire unless the AutoPostBack property is True. Therefore I would suggest that you load your comboboxes on demand instead of using the SelectedIndexChanged event. You can find more information here.

Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
AJAX and Web 2.0
Asked by
Dayana Maliyakal
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or