AJAX :: Reorder List Edit Button Need To Be Clicked Twice Before The Event Is Fired?
Jul 27, 2010I have a reorder list with edit and delete buttons.
i need to click twice to get the event fired.
I have a reorder list with edit and delete buttons.
i need to click twice to get the event fired.
I have an Ajax Toolkit Combo Box in DropDown Style (to allow user to enter custom value). The event SelectedIndexChanged and TextChanged works fine if the user select an item of the list of the combo box.
The problem is if the user enter a value that is not in the list of the item of the combo box, the event SelectedIndexChanged nor TextChanged are fired. Is there a way to "force" those events to be fired?
This details view is in a modal pop up. When the edit button is clicked the details view should go into edit mode with the edit button being switched to not visible and the update button being set to visible. This worked with a non ajax Master/Details. Now though when the edit button is clicked the details view closes, or disappears. I don't have any code to set the visible property of the details view to false. I don't understand why it's disappearing and why the buttons aren't changing the way they should.I also tried this with the OnClick event but the same thing happens.
[Code]....
Event handler:
[Code]....
I am begier in AJAX.
I taken one Accordian Cotrol.
In side that I have taken Accordion Pen Control.
Inside that I taken a button.
But when I click the buton page is get post back but Button Click event is not getting called.
how should I do so the button click event is get called?
[Code]....
A breakpoint is set on FillForm() and this method is called two times but I can't explain myself why this happens. I have client side javascript code, when the form is being send, the onsubmit method is also called twice... Where do I have to search?! Is it a (known) bug? Think I could get it to work with this Thread: [URL] But why is the event fired within the onblur-event when it's fired anyway??
I have the same problem as Simon in this post. He found out some sort of a solution, but it does not work for me. Please, could someone explain me what is going on in this answer or advice me something else. PS: there is an example on the asp.net site which doesn't work exactly the same way as my reorder list... (click view a demo) The solution that is suggested here adds these few lines to web.config:
[Code]....
Perhaps I just need to change something to make it work... but I don't know what. For example I have no idea what the ScriptResource.axd is supposed to be. My code: .aspx file
[Code]....
and the code behind
[Code]....
I load the data to the List collection from the page_load event but that works fine. The data binding works as well. The problem is in that the items cannot be reordered -- during the reordering, the sort value doesn't change and the list doesn't update.
I have the same problem as Simon in this post. He found out some sort of a solution, but it does not work for me. Please, could someone explain me what is going on in this answer or advice me something else. PS: there is an example on the asp.net site whh doesn't work exactly the same way as my reorder list... (click view a demo) The solution that is suggested here adds these few lines to web.config:
<httpHandlers>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
Perhaps I just need to change something to make it work... but I don't know what. For example I have no idea what the ScriptResource.axd is supposed to be. My code: .aspx file
<%@ Page Title="" Language="C#" MasterPageFile="~/editor/editor_template.Master" AutoEventWireup="true" CodeBehind="menuEditor.aspx.cs" Inherits="WebPageEditor.editor.menuEditor" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="DeleteMenu" InsertMethod="InsertMenu" SelectMethod="SelectMenu"
TypeName="WebPageEditor.editor.MenuSourceManager" UpdateMethod="UpdateMenu"
>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="url" Type="String" />
<asp:Parameter Name="order" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="url" Type="String" />
<asp:Parameter Name="order" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ReorderList ID="ReorderList1" runat="server" AllowReorder="True"
DataSourceID="ObjectDataSource1" PostBackOnReorder="False"
ShowInsertItem="True" SortOrderField="order" DataKeyField="ID"
ItemInsertLocation="Beginning">
<ItemTemplate>
<div class="menuEditor">
» <%# Eval("name") %>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">LinkButton</asp:LinkButton>
</div>
</ItemTemplate>
<DragHandleTemplate>
<img src="ico/moveHandle_ico.gif"
alt='<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources: editorLocalization, ME_moveHandleTT %>" />'
style="cursor:move; width:35px;" />
</DragHandleTemplate>
<ReorderTemplate>
<asp:Panel runat="server" />
</ReorderTemplate>
<InsertItemTemplate>
<asp:Panel ID="panel1" runat="server" DefaultButton="Button1">
<asp:TextBox ID="TextBox1" runat="server" Text=' <%# Bind("name") %>' ValidationGroup="add" />
<asp:Button ID="Button1" runat="server" CommandName="Insert" Text="Add" ValidationGroup="add" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="add"
ErrorMessage="Please enter some text" ControlToValidate="TextBox1" />
</asp:Panel>
</InsertItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("name") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("url") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("order") %>' ValidationGroup="edit" />
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">LinkButton</asp:LinkButton>
</EditItemTemplate>
</asp:ReorderList>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
and the code behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace WebPageEditor.editor
{
public class MenuSourceManager
{
public static List<MenuItem> menuItems;
#region DataBindMethods
//[System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
public List<MenuItem> SelectMenu()
{
return menuItems;
}
public void UpdateMenu(int ID, string name, string url, int order)
{
menuItems[ID].Name = name;
menuItems[ID].Url = url;
menuItems[ID].Order = order;
}
public void InsertMenu(string name, string url, int order)
{
menuItems.Add(new MenuItem(name, url, order, menuItems.Count));
}
public void DeleteMenu(int ID)
{
menuItems.RemoveAt(ID);
}
#endregion
}
public class MenuItem
{
public MenuItem(string name, string url, int order, int ID)
{
Name = name; Url = url; Order = order; this.ID = ID;
}
public string Name { get; set; }
public string Url { get; set; }
public int Order { get; set; }
public int ID { get; set; }
}
}
I load the data to the List collection from the page_load event but that works fine. The data binding works as well. The problem is in that the items cannot be reordered -- during the reordering, the sort value doesn't change and the list doesn't update.
Reorder list to do control placement
[Code]....
I' m using Reorder list sample for the first time. When it is bound with datasource, and reordered it is working fine. but unfortunately on postback to the server, i',m not getting the reordered items.
View 5 RepliesIm using a toolkit reorder list control. Im using LINQ2SQL. I have troubles making the order changes in the list to be updated to the database. This is my aspx code:
[Code]....
The drag and drop reordering works fine. In my
[Code]....
But no changes to the order are visible. What is missing?
[Code...]
Reorder list control cannot be set to not postback? My hope for this control was that I could tie it to a list of data (either a datasource or even a manually created list) and then allow the user to move the items in the list up and down until they liked the new order of all of the elements. They then would click a button to save the updates to the database. Is this possible? It seems that after every reorder there is a postback requried to the datasource to perform an UPDATE, even if the PostBackOnReorder
="false"
value is set.
So if my list is
1 Atlanta
2 Boston
3 Chicago
4 Denver
5 Edmonton
and they want to switch Denver with Boston and then hit the Update List button I could cycle through the list an only update two entries rather than all 5 entries twice (for each Postabk on reorder)
I have an issue with the appearance of my reorder list. The draghandle div is outside of the item template div. I have used the reorder list in the past and the draghandle was always inside of the item template. I can't seem to find any mistakes so is this a bug or do I have a mistake somewhere. All other functionality works great. Here is the code.
[Code]....
I did the tutorial for the ReorderList on the asp.net site: http://www.asp.net/ajax/tutorials/drag-and-drop-via-reorderlist-cs and everything works perfectly. But for some reason when I switch out the references and use the same code for my db table the changes aren't saving. In other words when I use the db table called 'AJAX' that I created based on the tutorial everything works perfectly, but when I use it on my table ('projects') the changes don't save to the db. I can't think of anything in the db that would be causing this to happen.
Here's my code:
//This works
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="asm" runat="server" />
<div>
<asp:ReorderList ID="rl1" runat="server"
SortOrderField="position"
[Code]....
I have one Button (Refresh Button), One ComboBox (containing DEV and UAT as its items) and a GridView on my asp page.
I am filling up my Grid with values from database on the ComboBox's 'TextChanged' event and Buttons's 'Click' event.
First time when page is loaded, there is no information in the grid, but when i choose DEV/UAT from the ComboBox 'TextChanged' event is fired, the grid is filled with the relevant data. That is what i want.
When i click the Refresh Button to refresh the data again, first comboBox's 'TextChanged' event and then 'btn_Click' event is fired.
I want then when a button id pressed only 'Click' event to be fired and not the ComboBox's 'TextChanged' event.
i have written an button click event in js file but the event wasnt fired the code seems below
$("#btnSearch").click(function () {
debugger; alert("search button event fired");
$("#ctl00_MaintenanceContentHolder_btnSearch").click(function
ugger; alert("searchbutton event fired");
I am using reorderlist for the first time and I am having trouble getting to display like the default look I see at ajax toolkit examples webpage. Also, when I try to click on it and move any row nothing happens. I have a MSSQL table that has the following 4 fields
ToDoId (primary key, int, identity, not null)
ToDoChar (char(1), null)
ToDoDescription (varchar(50), null)
ToDoPosition (int, null)
I have the following code
[Code]....
I've just discovered the AJAX ReOrder list. So far, I've been able to pull data from the DB, and in the browser I can reorder the items; but how do I save the new order? Here's my code so far:
[Code]....
I'm using a reorderlist (Ajax Control Toolkit Release 4.1.40412.2) inside a scrolling div (class="reorderListDemo" style="overflow:scroll; height:225px; width:1300px; table-layout:fixed; text-align:left;"). When the height of the reorderlist is greater than the height of the div, the div will automatically have a vertical scrollbar. The problem is that when i scroll down to drag an item from the bottom of the reorderlist, the reorderlist does not work properly. The drag image and the drop target does not correspond to the item i want to move.I've attached a copy of my css file:
[Code]....
Here is the html markup of reorder list control:
I have three reorder lists on a page, one does not want to work. It is no different to the others, but is behaving like it is not enabled.All working fine in IE 7 + 8.
View 1 RepliesI have tried several examples of reorder list with several types of data sources and can't get the list to reorder. I have copied Joe Stagner's code from his Video on Reorder Control with the same result. Here is the Video
http://www.asp.net/ajax/videos/how-do-i-the-ajax-toolkit-reorder-control. Page loads, but I can't drag items to reorder. I have tried this with explorer 8 and firefox 3.6, with and without security. Here is the markup, no code behind.
[Code]....
Some of the events don't seem to fire. DataBinding, DataBound, Load, and InsertCommand work ItemReorder does not, (not good for a reorder control). This control should work, but doesn't. I am able to insert data so it seems that the reorder or dragItem templates maybe causing problems. I have commented out but that doesn't help. Here is my only clue, I had to use the script manager from the .net4 Ajax Control Kit for my events to not complain about definitions. I was only using these events with debugger just to see if they are being called, no code in methods. But I am using the toolkit.dll that came with Joe's example. I tried it with .net4 only first, but that didn't work either that's when I installed the dll from Joe's example.
How can I set Focus to a TextBox while Button click event is fired using Default Button when enter key is pressed. Here is my Page and code.
<%@ Page Title="" Language="C#" MasterPageFile="~/mpChat.master" AutoEventWireup="true" CodeFile="FocusTest.aspx.cs" Inherits="FocusTest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="Button1">
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox>
<asp:Button ID="Button1"
runat="server" Text="Button" onclick="Button1_Click" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
using System;
public partial class FocusTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
TextBox1.Focus();
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox1.Focus();
}
}
is it possible for reorder list to to allow user to drag n drop via column cell.
For example,
Column1 | Column2
------------------------------
Value1 |Value5
Value2 |Value6
Value3 |Value7
Value4 |Value8
Value 1 was drag n drop to the position of Value5. And Value5 ,Value6,Value7,Value8 position are reorder like Reorderlist in row.
[Code]....
[Code]....
The whole thing is in a form, and it doesnt postback when this button is clicked. Im no good with javascript, but i got a feeling thats not the problem.
i am using jquery flexi gride in web page and it is working fine .But now the problem is ocured when i click button to call server side event.I am not able to find out. My button is as fallows and i am
[Code]....
i created a panel and added controls dynamically into the panel say dropdownlist and button (Created dynamically). now my problem is that button click event is not getting fired . I tried with default button but no use.
View 4 Replies