Showing posts with label extender. Show all posts
Showing posts with label extender. Show all posts

Wednesday, March 28, 2012

Links for the images in slide show extender

Hai,

I am wondering why there is no way to provide link for the images in the Ajax slide show extender, Is there any way to provide links for the images in slide show extender?

Thanks & Regards

Mahesh

Hi Mahesh,

As far as I know, this feature isn't available now, you may submit a feature requesthere. Thanks.

List Search extender - activation on first load

Hi all,

I've encountered a probem with using the List Search Extender. These controls work fine during general use throughout my project (when the dropdown is selected by either clicking or tabbing on to the control).

However, on several pages I am seeking to set the focus to a dropdownlist which has an associated ListsearchExtender during the initial loading of the page. If I attempt to do this using simply:

Dropdown1.Focus()
or
 
ScriptManger.GetCurrent(Me.Page).SetFocus(Dropdown1)
 
.. I encounter a problem - the dropdown is focussed successfully but the listsearchextender is not activated - the user must click off the dropdown then re-select it.
 
I did find the following code useful:
 
 
function pageLoad() { var extender = $find('<%=lseCust.ClientID%>'); if (extender) { extender._handleFocus(); } }
 .. which I successfully activated the listsearch on page load. However, this also activates it across all postbacks, which is not appropriate.
 
Ideally, I would like to be able to "force" the listsearch to activate in all instances when the control is subject to focus, so I tried the following:
 
 
<script type="text/javascript">function ActivateListSearch() { var extender = $find('<%=Dropdown1.ClientID%>'); if (extender) { extender._handleFocus(); } } </script>Page_Load(ByVal sender as object,ByVal e as System.EventArgs)Handles Me.Load
 Dropdown1.Attributes.Add("onfocus","ActivateCustListSearch()")End Sub
 
.. but this doesn't activate the list search during the first page load (no error is encountered), although the listsearch is operational when the user clicks or tabs onto the dropdown.
 
Has anyone else encountered this issue or found a workaround for it? 
 

Hi,

I think you can use the second parameter of pageLoad method to determine if it's a partialPostback.

For instance:

function pageLoad(sender, args) {
if(args.get_isPartialLoad ()) return;
var extender = $find('<%=lseCust.ClientID%>');

if (extender)
{
extender._handleFocus();
}
}


Monday, March 26, 2012

listsearch

I have put a list box search extender control on my page. It works great except for two things. First if I click in the list box it activates the index change and that may not be data field I wanted. Two when using the search option and I found the record I wanted. The record was highlighted and when I clicked on it nothing happens. I can click on other fields and the list box works great. I need some help.

when i select an item by the listseach the selecteditemchanged event doesn't works


Ajax ListSearchExtender does not force its targeted DropDownList to postback once the desired item has been selected.

You need to write a javascript to force the DropDownList to postback once it loses its focus.

I had the same problem and here's how I got around to it.

ASP

<asp:DropDownList ID="ddl_LocationID" runat="server" AutoPostBack="True" Width="200"

OnSelectedIndexChanged="ddl_LocationID_SelectedIndexChanged"

OnLoad="ddl_LocationID_Load"></asp:DropDownList>

Code Behind

protected void ddl_LocationID_Load(object sender, EventArgs e)
{
string script = ClientScript.GetPostBackEventReference(ddl_LocationID, "");
ddl_LocationID.Attributes.Add("onblur", script);
}

protected void ddl_LocationID_SelectedIndexChanged(object sender, EventArgs e)
{
// Do something when an item has been selected
}


Lonnie, try this:

HTML

<script type="text/javascript">function UpdateLabel(){var btn = $get("ctl00_MainContent_btnTest");if(btn != null) { btn.click(); }}</script><asp:UpdatePanel ID="ListBox_UpdatePanel" UpdateMode="Conditional" runat="server"><ContentTemplate><asp:ListBox ID="ListBox1" onclick="UpdateLabel();" runat="server"><asp:ListItem Text="Item 1" Value="1" Selected="true" /><asp:ListItem Text="Item 2" Value="2" /><asp:ListItem Text="Item 3" Value="3" /><asp:ListItem Text="Item 4" Value="4" /><asp:ListItem Text="Item 5" Value="5" /></asp:ListBox><asp:Label ID="lblItem" runat="server" /><asp:Button ID="btnTest" Text="Update Label" OnClick="UpdateLabel" runat="server" /><ajaxToolkit:ListSearchExtender ID="lseListBox1" TargetControlID="ListBox1" runat="server" /></ContentTemplate></asp:UpdatePanel>

Code Behind:

Protected Sub UpdateLabel(ByVal senderAs Object,ByVal eAs EventArgs)Me.lblItem.Text =Me.ListBox1.SelectedValueEnd Sub

fikreter, you need to put AutoPostBack="true" on your listbox:

Let me know if any of you need further help ...


The latest toolkit release containts an updated version of the ListSearch Extender which will fire an OnChange (and therefore postbacks) when the target List loses focus (if you Tab or click away), or if you hit Enter.

Regards,

Damian

ListSearchExtender error - System.InvalidOperationException: Extender controls may not be

I created a custom web control (ListSearchControl) using the ListBox and ListSearchExtender control. I added this control to another custom control which is dynamically added to a page. The page ahs a ScriptManager tag before any other controls and inside Form tag. The control works fine on page laod, but gives an error on post back - "System.InvalidOperationException: Extender controls may not be registered after PreRender".

I tried using the same custom control((ListSearchControl) adding it to the page directly and it works fine even on postback.

Is there any way to get out of the error in the first case, or is there a known problem with using Control toolkit extenders being added dynamically on the page?

Hi,

Please try the workaround in this thread : http://forums.asp.net/t/1160803.aspx

Nai-Dong Jin - MSFT:

Hi,

From your description, it seems that while you are usingASP.NET AJAX Toolkit with your controls, you'll get a message whichsays "Extender controls may not be registered after PreRender", right?

For this kind of issue, one workaround is to call the baseOnPreRender method before declaring your controls while overriding theOnPreRender method on the page where you had the new extender control.See the following code snippet:

protected override void OnPreRender(EventArgs e)
{
// add base.OnPreRender(e); at the beginning of the method.
base.OnPreRender(e);

// codes to handle with your controls.
...


}

Also, there's a good sample on how to create an ASP.NET AJAX Toolkit Extender Control to Extend an standard control. See,
http://weblogs.asp.net/dwahlin/archive/2007/08/08/creating-an-asp-net-ajax-toolkit-extender-control.aspx

ListSearchExtender could work much better with slight enhancement

The List Search Extender is definitely very useful but a slight enhancement could make it a lot better. I use a javascript implementation of this type of functionality in my code which can be seen at:

http://www.codeproject.com/useritems/selectasyoutype.asp

The key difference is the following. Say as an example you have a long list of names in a listbox e.g. list of countries. You start typing 'i' 't' 'a' for Italy. Now you can change your mind and actually want to go for Spain so you next type in a 's' and then 'p' etc. Where the Select As You Type script differs is that when it doesn't find any matches for 'i' 't' 'a' 's' 'p', it starts again at the point where you started a new search. So instead of the listbox looking for 'itasp', it actually realises that it should now be looking for countries starting with 'sp'. Could you guys possibly implement that as it is far better than having to erase each of the characters to start the listbox search again.

Regards

Harel

This is an interesting idea -- I've created a work item for it. If anyone else would like this functionality then please vote for it:http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=8763

Regards,

Damian


There would need to be some type of timeout attached to the control so if a user stopped typing for X seconds and started again, the control would realize that a new sequence of characters was being typed. Explorer.exe contains that functionality, of course.

I definitely vote yes for it.

Saturday, March 24, 2012

Load datas dynamically to ASP.NET AJAX Modalpopup Extender

Hai Friends,

I have Gridview in a page. When a each row in the Grid is Clicked, I need to load the all details regarding that selected row from the DB to an AJAX Modal popup extender. How to use DynamicControlID, DynamicContectKey, DynamicServiceMethod properties of Modal popup to achieve this. I don't have or need any Updatepanel in the web page. Please reply a solution

Sreejith

See this posthttp://forums.asp.net/p/1068303/1551580.aspx

-Damien


Hi,

See this great article wrote by Brian Smith :Displaying Extended Details in a GridView Using an Ajax Pop-Up (Part 1) Part 2

As web developers we are often tasked with building online reports. ForASP.NET 2.0 web applications, the GridView control is commonly used to display report data. A common challenge in building reports is achieving the right balance between readability and information. Users want to have all of the pertinent information available on one screen, but too much data dumped on a single screen leads to information overload and makes the report difficult to digest. Oftentimes, a report displays the high-level information and enables users to drill down into the details. One way to implement drill down details is to add a link to each item in the report that, when clicked, takes the user to a page that shows the selected item's details. This approach works well if the details displayed require significant screen real estate or if the user is likely to only want to view a particular item's details. If, however, a typical user needs to view the details for many items, having to go to a separate web page to view each item's details can be counterproductive. An alternative approach is to have a window appear on screen when mousing over a particular item that would show the item's details.

At work I was asked to build such a report interface: a GridView showing high-level details that, when moused over, show their details in an on screen pop-up window. I decided to useMicrosoft's ASP.NET AJAX framework to accomplish this task. In this article, I'll show you how to build your own dynamically-generated pop-up window filled with extended information about an item in a GridView. This is the first of a two-part article series. In this part we'll look at building the application architecture, which will consist of a Typed DataSet and some custom classes. In a future installment we will look at implementing the Ajax-related functionality. Read on to learn more!

For more information, see:

Dynamic content made easy [How to: Use the new dynamic population support for Toolkit controls]:http://blogs.msdn.com/delay/archive/2006/09/19/762609.aspx

Both the two articles demonstrate what you need do.

Best Regards

Wednesday, March 21, 2012

Loading all dropdowns with cascading dropdown extender

Since the cascading dropdown extender loads all dropdowns with a webservice, is it faster to load all dropdowns with this even if cascading is not needed?

In other words, is it faster to load a large (100+) dropdown with the cascading dropdown extender than doing it on the page load?

Hi Red_bull_n_vodka,

red_bull_n_vodka:

Since the cascading dropdown extender loads all dropdowns with a webservice, is it faster to load all dropdowns with this even if cascading is not needed?

In other words, is it faster to load a large (100+) dropdown with the cascading dropdown extender than doing it on the page load?

Actually, CascadingDropDown will call its WebService as soon as it is initialized. So I don't think it will be prominent faster in your situation. To speed up the response times , I think you should pay more attention to WebService rather than the client implementation.For example, cache and connection pool etc.

I hope this help.

Best regards,

Jonathan