473,395 Members | 1,574 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,395 software developers and data experts.

datgrid help

Hi,

Is there a simple way to read the current value in a datagrid's cell?

I know how to use
Grid.CurrentCell.RowNumber
Grid.CurrentCell.ColumnNumber
but these give me the co-ordinates of the cell. I'd like to know about
the contents of the cell, especially the current values. (type, width,
etc would be nice too)

I tried using the binding context, but that gets me the current row and
I am not sure how to then read (and later update) the selected cell.

I searched the web and there are many third party add-ins, I am sure I
am missing something that is already there.

Thanks

Richard

p.s. Are there any good books or websites to help learn datagrids?
Nov 21 '05 #1
4 1017
Hi,

http://msdn.microsoft.com/library/de...oundstopic.asp

Ken
-------------------
"Richard Fagen" <no_spam@my_isp.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...
Hi,

Is there a simple way to read the current value in a datagrid's cell?

I know how to use
Grid.CurrentCell.RowNumber
Grid.CurrentCell.ColumnNumber
but these give me the co-ordinates of the cell. I'd like to know about
the contents of the cell, especially the current values. (type, width,
etc would be nice too)

I tried using the binding context, but that gets me the current row and
I am not sure how to then read (and later update) the selected cell.

I searched the web and there are many third party add-ins, I am sure I
am missing something that is already there.

Thanks

Richard

p.s. Are there any good books or websites to help learn datagrids?
Nov 21 '05 #2
Hi Ken,

When I was browsing MSDN, I saw that method, "DataGrid.GetCellBounds"
but it "Gets the Rectangle that specifies the four corners of a cell."

This isn't what I was looking for. I am looking for the contents of the
cell, ie "What is the value of the data the user clicked on in the
datagrid?"

Am I misunderstanding something and the GetCellBounds can do this?

Richard

Ken Tucker [MVP] wrote:
Hi,

http://msdn.microsoft.com/library/de...oundstopic.asp

Ken
-------------------
"Richard Fagen" <no_spam@my_isp.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...
Hi,

Is there a simple way to read the current value in a datagrid's cell?

I know how to use
Grid.CurrentCell.RowNumber
Grid.CurrentCell.ColumnNumber
but these give me the co-ordinates of the cell. I'd like to know about
the contents of the cell, especially the current values. (type, width,
etc would be nice too)

I tried using the binding context, but that gets me the current row and
I am not sure how to then read (and later update) the selected cell.

I searched the web and there are many third party add-ins, I am sure I
am missing something that is already there.

Thanks

Richard

p.s. Are there any good books or websites to help learn datagrids?

Nov 21 '05 #3
Hi,

Saw you were looking for cell width and stopped reading. You get
the cell value with the datagrid.item property

http://msdn.microsoft.com/library/de...sitemtopic.asp

Ken
-------------
"Richard Fagen" <no_spam@my_isp.com> wrote in message
news:em**************@TK2MSFTNGP14.phx.gbl...
Hi Ken,

When I was browsing MSDN, I saw that method, "DataGrid.GetCellBounds"
but it "Gets the Rectangle that specifies the four corners of a cell."

This isn't what I was looking for. I am looking for the contents of the
cell, ie "What is the value of the data the user clicked on in the
datagrid?"

Am I misunderstanding something and the GetCellBounds can do this?

Richard

Ken Tucker [MVP] wrote:
Hi,

http://msdn.microsoft.com/library/de...oundstopic.asp

Ken
-------------------
"Richard Fagen" <no_spam@my_isp.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...
Hi,

Is there a simple way to read the current value in a datagrid's cell?

I know how to use
Grid.CurrentCell.RowNumber
Grid.CurrentCell.ColumnNumber
but these give me the co-ordinates of the cell. I'd like to know about
the contents of the cell, especially the current values. (type, width,
etc would be nice too)

I tried using the binding context, but that gets me the current row and
I am not sure how to then read (and later update) the selected cell.

I searched the web and there are many third party add-ins, I am sure I
am missing something that is already there.

Thanks

Richard

p.s. Are there any good books or websites to help learn datagrids?

Nov 21 '05 #4
Hi Ken,

That link is more like it :)
That was exactly what I was looking for. Thanks!

Richard

Ken Tucker [MVP] wrote:
Hi,

Saw you were looking for cell width and stopped reading. You get
the cell value with the datagrid.item property

http://msdn.microsoft.com/library/de...sitemtopic.asp

Ken

Nov 21 '05 #5

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
0
by: Mike | last post by:
Hi, I am having problems with my program, the problem is it will not put the datagrid into edit mode. The .aspx page has the following code in it : - <asp:datagrid id="DataGrid2"...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
0
by: Iain | last post by:
Hi All I have a datagrid which takes it's data from a table on a remote i-series. This datagrid is loaded on Page Load and the user is able to select a record to edit by pressing the...
2
by: 1980dinesh | last post by:
Hi, I have a DatGrid and i have added a checkboxes as template column i have write javascipt code to check and unckeck but at button event of code behind i can't grab the (checked) true condition...
0
by: coolferrari | last post by:
hi friends...... i hve created a datagrid with checkboxes which dispalys some items from sql server.......... if i want to dispaly the selected items on another datagrid.with only selected items.....
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...
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
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...

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.