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

DataGridView.currentCell bytes

Luckie
4
Hi All experts there,
I am developing a software using datagridview (vb6 feels better) and i am using virtualMode.

it shows the focus blue box but it is not possible to fill data to the first cell programatically. what is wrong here.

also i have used from within a button_click event as follows

1- MyGrid.CurrentCell.Value = 22

2- MyGrid.Rows(0).Cells(0).value = 22

3- MyGrid.BeginEdit(True)
3- MyGrid.CurrentCell.Value = strData

Thanks in advance
Luckie
Jun 12 '09 #1
4 3361
Plater
7,872 Expert 4TB
You are saying you cannot progmatically edit the values in your DataGridView object? Hmm.
This line should have worked:
MyGrid.Rows(0).Cells(0).value = 22
Jun 12 '09 #2
Luckie
4
Thanks for your interest
No did you notice that the virtual mode = true
Thanks
Jun 12 '09 #3
Luckie
4
forget the last one

just draged a datagridview and a button on to the stage
created a colomn list for the datagrid at design time

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

DataGridView1.Rows(DataGridView1.CurrentCell.RowIn dex).Cells(DataGridView1.CurrentCell.ColumnIndex). Value = 90000
'now how to rightarrow key for the DataGridView1
'so the data will be gone into the cell and get the focus to the next cell
'actually i neew this action to create a row and make it ready to accept data
'inserted by a class or something
'this is not bound to any data source
'******** notice if you enter data directly a new row is created
'here it is not why?

End Sub
Jun 13 '09 #4
Luckie
4
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DataGridView1.BeginEdit(False)
DataGridView1.Rows(0).Cells(0).Value = 12234
DataGridView1.Rows(0).Cells(1).Selected = True
End Sub

even here its click twice to fill the first one
Jun 13 '09 #5

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

Similar topics

3
by: ShaneO | last post by:
Is there a way to discover the starting X & Y position (in Pixels) of a Cell within a DataGridView control on a Windows Form? (VS2005) I've searched everywhere, and tried everything I can think...
5
by: DanThMan | last post by:
The situation: * I have a ButtonColumn in a DataGridView. * When the user preses one of the buttons, a dialog appears. * Based on what the user selects in the dialog, data is entered...
0
by: Andrus | last post by:
I have combobox column in DataGridView. Up and down error keys should be used to navigate previous and next row in grid. For this I override them in ProcessCmdKey() event. When combobox...
0
by: teo | last post by:
Hello. I have a DataGridView with a lot of rows. I created a sort of "Goto" . I used the CurrentCell property. The DataGridView scrolls down and the new cell is now visible and it is blue...
0
by: Matt Pegg | last post by:
Hi all, I want be able to enable and disable navigation buttons when on the first or last row of a DataGridView object. I have a populated DataGridView and two buttons - "First Row" and...
0
by: ajanu81 | last post by:
hi all, i am new to this forum. i am using a windows application using C#. I am using a datagridview to display contents of a xml file. say i have a xml file like this. <xml version="1.0"...
2
by: =?Utf-8?B?VG9ueSBBLg==?= | last post by:
Before saving information in a datagridview to a database I'm trying to verify tha certain cells are not blank (dbNull). When I run this code: If IsDBNull(Me.dgvHistory(2,...
6
by: hzgt9b | last post by:
Using VS2005, VB.NET, I have a windows app with a DataGridView (lets call it DGV). At some point in the life of my app I want to clear the selection of the currently selected row...
4
by: Michel Walsh | last post by:
Someone has an example, C#, about how to set the cell(int row, int col) as the current cell for a DataGridView. The example, in the help file, about DataGrid.CurrentCell Property (Set) ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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,...
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...

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.