473,657 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to update a detailsview with a gridview in Atlas?

Hi, I have a gridview and a detailsview. Is it possible to select a
row in the gridview, not have a postback, and instead have a
detailsview populate based upon the gridview - in Atlas, no postbacks?

Thanks.

Apr 24 '06 #1
1 1409
You could add an UpdatePanel, put the DetailsView in its
ContentTemplate , add an event trigger for the gridview control on
SelectedIndexCh anged, and rebind the DetailsView serverside.

Something like:
<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
AutoGenerateSel ectButton="True "
DataKeyNames="P roductID" DataSourceID="S qlDataSource1"
OnSelectedIndex Changed="GridVi ew1_SelectedInd exChanged">
<Columns>
<asp:BoundFie ld DataField="Prod uctID"
HeaderText="Pro ductID" InsertVisible=" False"
ReadOnly="True" SortExpression= "ProductID" />

</Columns>
</asp:GridView>
<asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:NorthwindCon nectionString %>"
SelectCommand=" SELECT [ProductID] FROM [Alphabetical list
of products]">
</asp:SqlDataSour ce>
<br />
<br />

<atlas:UpdatePa nel ID="UpdatePanel 2" runat="server">
<ContentTemplat e>
<asp:Label ID="Label3" runat="server"
Text="Label"></asp:Label>
</ContentTemplate >
<Triggers>
<atlas:ControlE ventTrigger ControlID="Grid View1"
EventName="Sele ctedIndexChange d" />
</Triggers>
</atlas:UpdatePan el>
---
protected void GridView1_Selec tedIndexChanged (object sender, EventArgs
e)
{
Label3.Text =
GridView1.Selec tedDataKey.Valu es["ProductID"].ToString();
}

Apr 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1880
by: rob merritt | last post by:
Hi I am trying to update via an datagrid only nothing seems to happen how would I diplay what the update query looks like msgbox reponse.write? where do I put em? <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1
402
by: Jim McGivney | last post by:
In VS-05 on an aspx page I have a GridView with a select item column. When the select button is pressed a DetailsView control opens with the selected record displayed. The user can now edit the record by pressing the edit button. After the record is edited in the DetailsView the update button is pressed. The problem is that the DetailsView now shows the correctly edited entry, while the GridView has not been updated. I can change...
7
4536
by: AG | last post by:
Hi, ASP.NET 2.0 web app I have a GridView utilizing template columns and bound to an objectdatasource. In the edit template of one column there is a dropdownlist bound to another objectdatasource. The dropdownlist displays the appropriate values when entering edit mode. However when I try to update, I receive the following error.
0
1414
by: Oystein | last post by:
Hi! I've got a aspx page with a textbox, a detailsview and a gridview. In the textbox i enter a jobnumber. If the jobnumber exists in the table, the detailsview shows the columns in the table in edit mode. The Gridview shows all columns in the selceted row. The Jobnumber is the tables primary key. So when i edit some of the fields in the detailsview and select update, I can see in yhe gridview that the update is ok. BUT! When I select *...
4
2295
by: ccshine | last post by:
I have several textboxes, a gridview and an image in a panel that need to be updated based upon info entered into a textbox. Everything works like a champ when I don't use the Atlas UpdatePanel, but I can't seem to figure out how to get even one section to work. Initially I had all 3 areas wrapped into the UpdatePanel and now I'm just trying to update some textboxes with info returned from the server. Neither one works. I tried the...
4
12558
by: Tomasz | last post by:
Hello Developers, Here is interesting problem I just came across: how do I wire a GridView control programmatically? Here is my sample code using Object Data Source: protected void Page_Load(object sender, EventArgs e) { ObjectDataSource ods = new ObjectDataSource("MyTestTableAdapter",
3
2059
by: dhaneshrs | last post by:
I have a gridview i managed to update using the edit option in the smartmenu. The problem comes when i delete a value or make a value read only. Say i have a table Employee with the following columns : EmpID, Emp Name, Password, Emp Type. Now when i remove the value EmpID, the gridview does not update. it just reloads when i hit update but no changes are made. On the other hand say i make Emp Type as Read only, when i update .. the...
1
5009
by: needhelp1 | last post by:
I have gridview with a detailsview below. When I click on 'New' in brings up the DetailsView for inserting. When I click on 'Edit' in does not brink up the DetailsView. What am I doing wrong? I totally at a loss, please help. I don't know if I need to something to grdUserProfile_RowEditing. Thank you! This is some of my code behind: protected void grdUserProfile_RowEditing(object sender, GridViewEditEventArgs e) { } protected void...
2
2503
by: bogdan | last post by:
Hi, Can a single GridView be 'connected' to DetailsView that renders itself differently based on the currently selected row? I have a GridView with rows that could be displayed in the same way in the view (like a report) but when a user wants to edit/insert items I'd like to show a different layout and different controls based on the selected item type. For example, for some items I'd like to provide text boxes and for others I'd like...
0
8420
marktang
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...
0
8324
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,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
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...
0
7353
agi2029
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...
1
6176
isladogs
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...
2
1733
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.