473,237 Members | 1,235 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,237 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 12370
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.