473,394 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

want to get data from datagrid

Dear all

I am working on c#.net 2003 version

Making a window application in connection with sql database

what I need is i displayed the data in datagrid

if somebody select the row then the data of that row comes in variables

Wat i can do i didn't understand
is somebody help me regarding this

my email is nj.nikhiljain@gmail.com
Dec 8 '06 #1
3 12373
bhar
37
Dear all

I am working on c#.net 2003 version

Making a window application in connection with sql database

what I need is i displayed the data in datagrid

if somebody select the row then the data of that row comes in variables

Wat i can do i didn't understand
is somebody help me regarding this

my email is nj.nikhiljain@gmail.com

Hi,

I have done like this:

We can create a DataTable temporarily to hold data from the query result and bind it to the DataGrid using the following statement.
(DataGrid1.DataSource=dtbuser , here dtbuser is DataTable.

To display values from the grid to the varaibles,

if dtbuser.Rows.Count)=0 Then

text1.text=dtbuser.Rows(DataGrid1.CurrentRowIndex) .Item(0)

End If

TRy this book ,"Database programming using vb.net and sql server", [Link Removed]
This book deals with Datagrid programming extensively(Add ,modify,delete etc)

Regards
Madhav
Dec 11 '06 #2
same as the above

but try this

text1=datagrid1(currentrowindex,currentcolumnindex ).item.text

in the datagrid_selectedindex changed
Dec 11 '06 #3
Hi siricharan82 & Madhav

Thanks for the help
It Solve My Problem

Thanks & Regards
Nikhil
Dec 11 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
0
by: lucas | last post by:
Hi, I have a simple input form that i use to add records to a sql server database. Bellow that is a datagrid that has one template column that I use to dispaly the 3 fields with some html...
2
by: Andy Sutorius | last post by:
Can someone point me to an article on how to edit a datagrid when the grid is set to autogeneratecolumns? Each article I have come across has instructions when autogenerate is false and you have...
7
by: Brian Henry | last post by:
Hi, I have a data grid that has the following properties EnableViewState = false AllowPaging = true AllowSorting = true AllowCustomPaging = false now, when the page switches I want to get...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
1
by: pv_kannan | last post by:
One of our dev team members is having a strange problem with a datagrid... We are not seeing a datagrid's data getting refreshed after a new row is entered in a popup window inspite of resetting...
7
by: Mike Fellows | last post by:
Below is my code that is carried out on my dataset, datagrid etc... Im trying to get column0 "Date & Time" to show date and time, not just date ive read some stuff posted by Dmitriy Lapshin on...
4
by: Peter | last post by:
Does anyone know a way to import excel data very fast? I have spreadsheet data that has to be processed, the spreadsheet has 256 columns and 20,000 rows of data. That's 5,120,000 cells. The...
1
by: geeteshss | last post by:
Dear all, actually i spent a whole month on the R&D of datagrid edit ,update,cancel events but recently my guide told me to make it user friendly because no user would like to go on searching rows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...

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.