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

Display Rad Ajax Loading panel in grid template column.

3 Answers 45 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
emrah
Top achievements
Rank 1
emrah asked on 22 Jun 2010, 02:37 PM
Hello.

İ have an radGrid and i have templateColumn inside the grid.

and there is dropdownlist in the templatecolumn.

Users can change product status over the grid by this way.

and there is code in server side when dropdown list selected index changed.

but i want to display radAjaxLoading Panel over the each dropdownControl.

i writed this. but it is not solving my issue. because loading panel appering over the all grid when user change dropdownlist value.


 

<telerik:GridTemplateColumn HeaderText="Durum" HeaderStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="110px" >

 

 

<ItemTemplate>

 

 

<asp:DropDownList ID="drpProductStatus" runat="server" Width="100px" AutoPostBack="true"

 

 

OnSelectedIndexChanged="drpProductStatus_SelectedIndexChanged">

 

 

</asp:DropDownList>

 

 

</ItemTemplate>

 

 

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

 

 

</telerik:GridTemplateColumn>

 



...

and rad ajax manager code :

 

<telerik:AjaxSetting AjaxControlID="grid">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="grid" LoadingPanelID="alpCover" />

 

 

</UpdatedControls>



i dont want to display loading panel over the full grid. loading panel image must be place only dropdown when user affected the control.

i  tried to create AjaxSeeting in itemdatabound  but it works only first row of grid. 

 

 

DropDownList drpProductStatus = (dataItem["PRODUCT_STATUS_NAME"].FindControl("drpProductStatus") as DropDownList);

 

 

if (drpProductStatus != null)

 

{

 

 

 

 

 

RAM.AjaxSettings.AddAjaxSetting(drpProductStatus, drpProductStatus,

this.alpCover);

 

 

}

// it works only first row.


Pls help me.



3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Jun 2010, 03:39 PM
Hi Emrah,

Please note that the dynamic settings should be always added in a Page event handler, which is executed each time during the page lifecycle (Page_Load, Page_PreRender) so that the control could be ajaxified when the page is initially loaded.

More information is available here:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxsettingsprogrammatically.html

Kind regards,
Pavlina
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
emrah
Top achievements
Rank 1
answered on 22 Jun 2010, 05:02 PM

Thanks for kindly reply but its not neccesery for my problem. :) i am sorry.

i think you didn't read my post very well.

anyway, i solved my problem ,  I writed dynamic ajax settings code in grid_itemCreated. ( not dataBound)

so its works perfectly, thanks.

 

 

protected void grdShippedOrders_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

foreach (GridDataItem dataItem in this.grdShippedOrders.Items)

 

{

 

 

}

 

DropDownList drpProductStatus = (dataItem["PRODUCT_STATUS_NAME"].FindControl("drpProductStatus") as DropDownList);

 

 

 

if (drpProductStatus != null)

 

{

 

 RAM.AjaxSettings.AddAjaxSetting(drpProductStatus, drpProductStatus,

 

 

this.alpCover);

 

 

}

}

0
Pavlina
Telerik team
answered on 23 Jun 2010, 10:15 AM
Hi Emrah,

I am glad that you could solve the problem on your own. In case you have other questions or problems, do not hesitate to contact us again.

All the best,
Pavlina
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
Ajax
Asked by
emrah
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
emrah
Top achievements
Rank 1
Share this question
or