Hello,
I have a repeater showing a list of items and I would like to be able to
allow the user to change the order of the items. I have absolutely no
idea how to go about this, other than having a pair of Move Up/Down
buttons, which would result in a postback for every single move. This
would be very slow and frustrating for a user trying to move an item to
the top of a list.
Any ideas welcome. TIA
--
Alan Silver
(anything added below this line is nothing to do with me) 4 2535
It's possible to move them on the client using JavaScript.
My question is, what is rendered out to the client? If it is just random
html, it might be pretty difficult.
A 3rd party control would have a more sophisticated JavaScript Object
Notation model for capturing, moving, editing specific client side items.
--
Direct Email: Michael.Baltic@ RemoveCharacter sUpTo#NCMC.Com
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
"Alan Silver" wrote: Hello,
I have a repeater showing a list of items and I would like to be able to allow the user to change the order of the items. I have absolutely no idea how to go about this, other than having a pair of Move Up/Down buttons, which would result in a postback for every single move. This would be very slow and frustrating for a user trying to move an item to the top of a list.
Any ideas welcome. TIA
-- Alan Silver (anything added below this line is nothing to do with me)
>It's possible to move them on the client using JavaScript.
Any suggestions how? Javascript isn't my strong point ;-( My question is, what is rendered out to the client? If it is just random html, it might be pretty difficult.
Not sure what you mean here. The data in the repeater is just text, not
HTML.
A 3rd party control would have a more sophisticated JavaScript Object Notation model for capturing, moving, editing specific client side items.
Do you know of one?
Thanks for the reply.
--
Alan Silver
(anything added below this line is nothing to do with me)
If you aren't fond of doing postbacks, you will need to become a superstar at
JavaScript. Once you learn how to use it, your whole design process will
change!
Anyways, can you send me a sample of what kind of html is generated by your
control?
Basically, you will need to assign an id to each element that you want to
move. Then, you will need JavaScript event handlers for the mouse down event
and mouse up event so that you can capture which control was clicked on and
where it was dragged to. Then, you will have to rewrite the html in the new
order.
Huge task huh? Look at the ComponentOne and Infragistics tools or R.A.D.
they all have very advanced client side code.
If cost is an issue, find a control in the above companies toolset that you
like and search google for a cheap/free version?
--
Direct Email: Michael.Baltic@ RemoveCharacter sUpTo#NCMC.Com
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
"Alan Silver" wrote: It's possible to move them on the client using JavaScript.
Any suggestions how? Javascript isn't my strong point ;-(
My question is, what is rendered out to the client? If it is just random html, it might be pretty difficult.
Not sure what you mean here. The data in the repeater is just text, not HTML.
A 3rd party control would have a more sophisticated JavaScript Object Notation model for capturing, moving, editing specific client side items.
Do you know of one?
Thanks for the reply.
-- Alan Silver (anything added below this line is nothing to do with me)
>If you aren't fond of doing postbacks, you will need to become a superstar at JavaScript. Once you learn how to use it, your whole design process will change!
It's not my fondness (or lack) of postbacks that is the issue, this is
part of a much bigger form, and the user might not want to post the form
yet. They might not even be able to as other controls may fire
validation warnings, preventing them from posting until they fix the
data issues.
Anyways, can you send me a sample of what kind of html is generated by your control?
Plain old HTML table containing a list of product variations and sizes,
for example...
Small 1.99
Medium 2.99
Large 3.99
I just want them to be able to set the order. In many cases, if ordered
alphabetically, you would have an illogical ordering.
Basically, you will need to assign an id to each element that you want to move. Then, you will need JavaScript event handlers for the mouse down event and mouse up event so that you can capture which control was clicked on and where it was dragged to. Then, you will have to rewrite the html in the new order.
Ulp.
Huge task huh? Look at the ComponentOne and Infragistics tools or R.A.D. they all have very advanced client side code.
I have the C1 components, but haven't really investigated any of them
yet. Do they have anything similar to this, or were you just pointing
out that complex JS is a fact of life if you want a decent interface?
If cost is an issue, find a control in the above companies toolset that you like and search google for a cheap/free version?
I had a thought that I could offer a link where they can open a
secondary window containing a listbox of the current variations and
allow them to order that. I think that would be easier than the way you
suggested. They would have to post back at the end, but it would be part
way there. I was going to look around for some js examples of this sort
of thing.
Thanks for the comments.
--
Alan Silver
(anything added below this line is nothing to do with me) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ken Fine |
last post by:
(originally posted to one of macromedia's groups; no help, so hopefully
someone here can help me out. I'm using VBScript ASP.)
When designing administrative interfaces to websites, we often need to
provide users with a mechanism to change the order of items that are listed
on the page.For example, the _New York Times_ website
(http://www.nytimes.com) lists a bunch of top news articles, and normally
these are ordered by purely mechanical...
|
by: theComputer7 |
last post by:
I cut down the code to make this half way understandable... I have
read Data Grid girls caution about over use of dynamic controls. I
truly believe what I am doing requires dynamically inserted user
controls.
Worse I'm trying to add dynamic user controls from within a repeater
loop (looping through attributes)... I bind to a function in the code
behind and pass in the attribute.
<asp:repeater id="rAttributes" Runat="server">
|
by: Mark Fox |
last post by:
Hello,
I have a repeater and in each itemtemplate I have a
radiobuttonlist. I am attempting to figure out how on
postback I could iterate through the rows displayed by
the repeater and for each row grab the selected value of
the radio button list. When is the Repeater.Items
collection populated? I first attempted to access the
Repeater.Items collection from the Command event of a
normal linkbutton on the page, but it was empty. Is...
|
by: mrwoopey |
last post by:
I have a repeater control in a asp.net app. Once the repeater is fill
with data (via bind) I would like to go through the repeater and
change the color of one of the items. I can get to where the item is
by looping through and seeing the contents of the
DataBoundLiteralControl. I tried updating the DataBoundLiteralControl
by adding <font> tags to change the color but
objCurrentRepeaterItem.Controls(0) is read only.
So, how do you update...
|
by: Sam Kuehn |
last post by:
I have been stuck on this for some time and am desperate for a solution. I run into this all of the time! I will give a over simplified example to illustrate the problem. Say you have 2 user controls on a web form. One for inputing data (like a line item to an order) and one to display the detail data (a data grid with all line items the order). So, you input data into the input form, then click the add button. The from in posted back. ...
| |
by: Nathan Sokalski |
last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an event is fired by one of the controls contained in the User Control, these variable are reset. Here is my current code (I have a little more to add later, right now I am just concerned about the variables getting reset):
Public Class DatePicker2...
|
by: Jonathan Wood |
last post by:
Okay, as evidenced by other questions, I am an experienced programmer very
new to ASP.NET.
I have a vertical navigation bar. It is all one color with several panels
inside it with a different color. It looks okay but I'm wondering if each of
these several panels should be Web User Controls themselves.
I think this would make sense, and I can figure out how to add a property
that specifies the image that appears at the top of each of...
|
by: bill |
last post by:
I have a Repeater control in a web user control.
The web user control has a public method named PopulateRepeater which takes
an ID as an parameter and populates the repeater control based on the
parameter.
When I call PopulateRepeater from the User Control page_load event it
populates the repeater without a problem.
When I call PopulateRepeater from a procedure in the web form which contains
|
by: Nemo |
last post by:
Hi,
I have i fishy problem when I have e Repeater with user controls.
page_load
{
if (!isPostBack)
{
repeater.databind();
}
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |