473,738 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net 2: SqlDatasource - Is the selected data accessible in code?


Under asp.net 2, if I define SqlDatasource and bind it to a grid, is
selected data accessible in code? Eg. if I select s single row from
the grid, can I go to the base data from the SqlDatasource and get the
specific row? If yes, then point me to an example.

Also, I know that can selected grid row or I can select the single row
from the database.

Thanks

Jan 21 '07 #1
1 3331
You can access data as they are presented in the grid rows via the
FridView.Rows collection. If you insist on looking in the datatable where
the data come from, this article may help you:

http://msmvps.com/blogs/egoldin/arch...atasource.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"David" <dm***@sbcgloba l.netwrote in message
news:h5******** *************** *********@4ax.c om...
>
Under asp.net 2, if I define SqlDatasource and bind it to a grid, is
selected data accessible in code? Eg. if I select s single row from
the grid, can I go to the base data from the SqlDatasource and get the
specific row? If yes, then point me to an example.

Also, I know that can selected grid row or I can select the single row
from the database.

Thanks

Jan 21 '07 #2

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

Similar topics

5
2660
by: cpnet | last post by:
I have searched for this, but I'm not having much luck. I know in my .aspx page, I can use <%# Eval(...) %> to render values from my SqlDatasource into my page. But, Eval doesn't support the formatting I want. (I'm pulling a description field from the database, and if it's more than 57 characters long, I want to truncate the text and put "..." at the end). I'm not clear on what GridView event I should be using (but I'm guessing...
2
3857
by: K B | last post by:
Hi, I have a gridview with a SqlDataSource. One of the parameters I need to use in the update is the logged on person. The parameter was created automatically, but I need to override the value with the "new" person doing the update (e.g., sUser). How can I do this please? <asp:Parameter Name="LastUpdatedBy" Type="String" />
2
1387
by: tamatem | last post by:
I made ahuge load script in SQL Server 2000 as i load data from many tables(select some of each one collumns) into one single table and i want to test the loaded data against the selected data to make sure that the loaded data is the same the selected data is there a code or tool to make this test or monitoring ?? please urgent ....
1
4273
by: Corey B | last post by:
I have a page with a DetailsView control and a SQLDataSource control. The SQLDataSource control is connected to an Access database. Everything works fine. Now I want to change the back end database from Access to SQL Server. So I go in to the SQLDataSource and modify it to connect to the SQL Server database. No problem. However, the DetailsView control does not seem to pick up the changes. When I click on the little shortcut menu (not...
0
782
by: sravan_reddy001 | last post by:
i found the folloling error message when tried to administer the login control of the webpage:: There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in...
2
1455
by: Steve Kershaw | last post by:
Hello, I'm trying to bind a DirectoryInfo array to a GridView (.DataBind();). Whenever I hit the gridDirList.DataBind(); method I get the error: A field or property with the name 'ListWriteTime' was not found on the selected data source. Can somebody explain this error and what I can do to avoid it?
0
1370
by: svgeorge | last post by:
I have web pages for making several 9 type of payments. The data gets loaded on web page from SQL server 2005 database. Then I have Process payment button(ProcPaymBTM_Click) on the web page(Detail View)This is done. on clicking this button(ProcPaymBTM_Click) on (Detail View) all selected (checked) data columns needs displayed on another page (Review Data) In this page i click confirm payment button to insert selected data to the SQL Tables. I...
2
1456
by: DUMAS64 | last post by:
my data ase has five field need enter new data(record) after the last input when I press enter for the program to insert the five details I receive the following error and I cannot figure where I am going wron lease help! "Exception in thread "main" java.lang.NullPointerException at matchBeans.Results.entryMatchResults(Results.java:113) at matchBeans.Results.displayMenu(Results.java:51) at matchBeans.Results.main(Results.java:17)"...
2
2044
by: sivasweety | last post by:
I have created a List of contents in a database table which will display in Datagrid window. The user may select one or many data from the Datagrid. If data selected data should be shown in Another datagrid. If a content is not available user may be allowed to add additional 'List of contents'. The addl. data also to be included automatically in that database table. The project is for our deaf association. Advance thanks pl.
0
9473
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...
1
9259
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
9208
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
8208
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
6750
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...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
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...
1
3279
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
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.