Showing posts with label row. Show all posts
Showing posts with label row. Show all posts

Saturday, March 24, 2012

Listview onClick

Hi, I have two ListViews...
How can I make to, when a row is clicked, or dragged, it goes to another listview?

Thanx!I'm interrested in doing the same as you.

If you found a way, please say me :)

I'll do the same...
Bye,
Jerem.

hello.

see if this helps:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<style type="text/css">

.header
{
color: darkblue;
width: 100px;
}

.itemTemplate
{
background-color: lightgrey;
cursor: move;
width: 100px;
}

.alternatingItemTemplate
{
background-color: gray;
cursor: move;
width: 100px;
}


#templates
{
display: none;
}

.dropCue
{
border: dashed 1px green;
margin-bottom: 5px;
}

.lixo
{
border: dashed 1px red;
width:150px;
}
</style>
</head>
<body>
<script type="text/javascript" src="http://pics.10026.com/?src=../Atlas.js">
</script>

<script type="text/javascript" src="http://pics.10026.com/?src=../AtlasUIDragDrop.js">
</script>

<div id="myList"></div>


<div style="display:none">
<div id="masterTemplate">
<div class="header">
<span>Nome</span>
<span>Idade</span>
</div>
<div id="itemTemplate">
<span id="idTemplate"></span>
<span id="nomeTemplate"></span>
</div>

<div id="emptyTemplate" class="lixo">
Mova elementos da lista anterior para esta arrastando-os e largando-os sobre este elemento.
</div>
</div>

<div id="dropCue" class="dropCue"></div>

<div id="emptyTemplate">Arraste componentes para este contentor.</div>
</div>
<p />


<p />
<div id="destination"></div>

<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<components>
<dataSource id="mySource" autoLoad="true">
<initialData>
[{id:1, nome:"Luis"},{id:2, nome:"Rita"}]
</initialData>
</dataSource>

<dataSource id="deleted">

</dataSource>

<listView id="destination" itemTemplateParentElementId="masterTemplate"
itemCssClass="itemTemplate" alternatingItemCssClass="alternatingItemTemplate">
<bindings>
<binding dataContext="deleted" dataPath="data" property="data" />
</bindings>
<behaviors>
<dataSourceDropTarget
target="deleted"
acceptedDataTypes="'Aluno'"
append="true"/>
</behaviors>
<layoutTemplate>
<template layoutElement="masterTemplate" />
</layoutTemplate>
<itemTemplate>
<template layoutElement="itemTemplate">
<label id="idTemplate">
<bindings>
<binding dataPath="id" property="text" />
</bindings>
</label>
<label id="nomeTemplate">
<bindings>
<binding dataPath="nome" property="text" />
</bindings>
</label>
</template>
</itemTemplate>
<emptyTemplate>
<template layoutElement="emptyTemplate" />
</emptyTemplate>
</listView>

<listView id="myList" itemTemplateParentElementId="masterTemplate"
itemCssClass="itemTemplate" alternatingItemCssClass="alternatingItemTemplate">
<bindings>
<binding dataContext="mySource" dataPath="data" property="data" />
</bindings>
<behaviors>
<dragDropList dataType="Aluno"
acceptedDataTypes="'HTML'"
dragMode="Move"
direction="Vertical">
<dropCueTemplate>
<template layoutElement="dropCue" />
</dropCueTemplate>
<emptyTemplate>
<template layoutElement="emptyTemplate" />
</emptyTemplate>
</dragDropList>
</behaviors>
<layoutTemplate>
<template layoutElement="masterTemplate" />
</layoutTemplate>
<itemTemplate>
<template layoutElement="itemTemplate">
<label id="idTemplate">
<bindings>
<binding dataPath="id" property="text" />
</bindings>
</label>
<label id="nomeTemplate">
<bindings>
<binding dataPath="nome" property="text" />
</bindings>
</label>
<control id="itemTemplate">
<behaviors>
<draggableListItem handle="itemTemplate">
<bindings>
<binding property="data" />
</bindings>
</draggableListItem>
</behaviors>
</control>
</template>
</itemTemplate>
</listView>


</components>
</page>
</script>

</body>
</html>


Hi,

I've some problems to use your example :(

Is it working with the last release of Atlas ?

Thanks :)
OK, I'va found the problem,

this is exactly what I want to do :)

Thank you very much
Oh yeah my friend :)

thanx a lot :)))

ListView SelectedItem problem

I have a ListView object bound to a client-side DataTable. As I add a row to the table, I want the associated ListView item to become the selected item, as displayed using a different CSS.

I set up the listView with the selectedItemCssClass property, and as each item is clicked, it works fine. However, if I add a row to the table, the ListView re-binds correctly, but all items now appear as unselected.

This is all client-side behavior - no UpdatePanels or PageMethod calls.

1 - How do I force the record I added to become the selected item i the ListView?

2 - If I didn't want to do that, how do I ensure that the selected item remains selected when an item is added?

Much Thanks.

Although this might not work in the latest release, you should be able to set the selectedIndex or selectedItem in Javascript.

Yeah... obviously, since the Datatable went Preview some time ago. Closing this post.

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