Showing posts with label contained. Show all posts
Showing posts with label contained. Show all posts

Wednesday, March 28, 2012

programatically disable dropdown in Ajax updatepanel

I've searched high and low for what seemed would be a simple and frequently used method to access the properties of a drop down contained in a Ajax UpdatePanel without finding anyone who seems to have needed to do this or who has solved it. Maybe Microsoft decided nobody would ever want to do such a weird thing!

I have users with various permission levels. Depending on their level, on page load I need to disable drop downs which are contained within Ajax Updatepanels.

I can expose the properties of the UpdatePanels themselves but they do not support the enable property, only invisible which is no help.

Anyone know how this is done ?

Thanks

Aren't you able to just set the Enabled property of the appropriate DropDownList's?


Dont depends only on UI elements enable/disable state. Also enusre the User level in server side. Can pls post some code i mean in which point you want to disable the dropdown list.

Use CascadingDropDown control in AJAXControlToolKit

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx


Hi,

Are you using the AJAX extension version 1.0.61025.0 ?

I'm using this one. The controls inside UpdatePanel can be accessed directly. For instance:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { DropDownList1.Enabled = false; }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel> </div> </form></body></html>

Programmatic refresh of a tab

I have been trawling the forums for a while and still have no solution to my problem. I have multiple tabs each contained within update panels. What i need is for a submit button in one tab to perform the partial update and then programatically update a second tab as well. Any ideas would be greatly appreciated.

ok i finally solved my own problem. I set the updatemode property of the updatepanel to "always". That means that even if another tab is doing an async callback the other tab is always refreshed

Hi i am looking for past one week for tabview form in asp.net 2.0 plz could you help me how to create. i have search i dont have server control in asp.net 2.0. i cant use in my company in AJAX. so, plz let me know as soon as possible.

Thanks

dilip


Hi i am looking for past one week for tabview form in asp.net 2.0 plz could you help me how to create. i have search i dont have server control in asp.net 2.0. i cant use in my company in AJAX. so, plz let me know as soon as possible.

Thanks

dilip


Set UpdateMode="Always" will slow down the page if you have a lots of data on it. If you have many tabs but only want to update one or two of them,why don't try something like:

protectedvoid GridView1_RowUpdated(object sender,GridViewUpdatedEventArgs e)

{

GridView1.DataBind();

GridView2.DataBind(); UpdatePanel2.Update();

}