8 1698
* jaYPee <hi******@yahoo.com> scripsit: i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp.
C# -> VB.NET Converters:
<URL:http://www.aspalliance.com/aldotnet/examples/translate.aspx>
<URL:http://www.kamalpatel.net/ConvertCSharp2VB.aspx>
<URL:http://csharpconverter.claritycon.com/>
<URL:http://www.ragingsmurf.com/vbcsharpconverter.aspx>
<URL:http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=c622348b-18a9-47d6-8687-979975d5957d>
<URL:http://www.remotesoft.com/>
-> "Octopus"
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
thanks for the code. however the problem is that when i navigate to
the new row and don't enter any data and click to the other row (in
your example from any of the row from 1st row to 3rd row) it returns
an error No value at index 3.
and how can i make sure that when they add new record in this datagrid
they have to enter 1st from the 1st cell then 2nd,3rd and so on..
thanks once again..
On Sun, 25 Apr 2004 19:08:46 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
http://www.onteorasoftware.com/downl...validation.zip
Ken ---------------- "jaYPee" <hi******@yahoo.com> wrote in message news:o4********************************@4ax.com.. .i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp.
anyone have a vb version of this sample program?
Hi,
Change the DataGrid1_CurrentCellChanged procedure to this.
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles DataGrid1.CurrentCellChanged
newCurrentRow = DataGrid1.CurrentCell.RowNumber
newCurrentCol = DataGrid1.CurrentCell.ColumnNumber
Dim newText As String
Try
newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString()
If newCurrentRow <> oldCurrentRow Then
Dim x As Integer
For x = 0 To 2
Dim strTemp As String = DataGrid1(oldCurrentRow,
x).ToString
If strTemp = "" Then
DataGrid1.CurrentCell = New
DataGridCell(oldCurrentRow, x)
Return
End If
Next
End If
Catch
newText = ""
End Try
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol,
newText) Then
MessageBox.Show("Entry Error")
okToValidate = False
DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow,
oldCurrentCol)
okToValidate = True
Else
oldCurrentRow = newCurrentRow
oldCurrentCol = newCurrentCol
End If
End Sub
Ken
-------------------
"jaYPee" <hi******@yahoo.com> wrote in message
news:j6********************************@4ax.com... thanks for the code. however the problem is that when i navigate to the new row and don't enter any data and click to the other row (in your example from any of the row from 1st row to 3rd row) it returns an error No value at index 3.
and how can i make sure that when they add new record in this datagrid they have to enter 1st from the 1st cell then 2nd,3rd and so on..
thanks once again..
On Sun, 25 Apr 2004 19:08:46 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
http://www.onteorasoftware.com/downl...validation.zip
Ken ---------------- "jaYPee" <hi******@yahoo.com> wrote in message news:o4********************************@4ax.com. ..i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp.
anyone have a vb version of this sample program?
Thank you thank you very much for you help.
one more question and i'm done. in my datagrid i have checkbox located
in column 6. how can i prevent the user to encode to this checkbox if
the column 1 to 5 is not yet encoded?
i really really appreciate your help.
thanks once again...
On Mon, 26 Apr 2004 07:35:53 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
Change the DataGrid1_CurrentCellChanged procedure to this.
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged newCurrentRow = DataGrid1.CurrentCell.RowNumber newCurrentCol = DataGrid1.CurrentCell.ColumnNumber Dim newText As String
Try newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString() If newCurrentRow <> oldCurrentRow Then Dim x As Integer
For x = 0 To 2 Dim strTemp As String = DataGrid1(oldCurrentRow, x).ToString If strTemp = "" Then DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, x) Return End If Next End If Catch newText = "" End Try
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol, newText) Then MessageBox.Show("Entry Error") okToValidate = False DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, oldCurrentCol) okToValidate = True Else
oldCurrentRow = newCurrentRow oldCurrentCol = newCurrentCol End If End Sub
Ken ------------------- "jaYPee" <hi******@yahoo.com> wrote in message news:j6********************************@4ax.com.. . thanks for the code. however the problem is that when i navigate to the new row and don't enter any data and click to the other row (in your example from any of the row from 1st row to 3rd row) it returns an error No value at index 3.
and how can i make sure that when they add new record in this datagrid they have to enter 1st from the 1st cell then 2nd,3rd and so on..
thanks once again..
On Sun, 25 Apr 2004 19:08:46 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
http://www.onteorasoftware.com/downl...validation.zip
Ken ---------------- "jaYPee" <hi******@yahoo.com> wrote in message news:o4********************************@4ax.com ... i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp.
anyone have a vb version of this sample program?
Hi,
Try something like this
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles DataGrid1.CurrentCellChanged
newCurrentRow = DataGrid1.CurrentCell.RowNumber
newCurrentCol = DataGrid1.CurrentCell.ColumnNumber
Dim newText As String
Try
newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString()
If newCurrentRow <> oldCurrentRow Then
Dim x As Integer
For x = 0 To 2
Dim strTemp As String = DataGrid1(oldCurrentRow,
x).ToString
If strTemp = "" Then
DataGrid1.CurrentCell = New
DataGridCell(oldCurrentRow, x)
Return
End If
Next
End If
Catch
newText = ""
End Try
If newCurrentCol = 2 Then
For x As Integer = 0 To 1
Dim strTemp As String = DataGrid1(newCurrentRow, x).ToString
If strTemp = "" Then
MessageBox.Show("Please enter this value here first")
DataGrid1.CurrentCell = New DataGridCell(newCurrentRow,
x)
Return
End If
Next
End If
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol,
newText) Then
MessageBox.Show("Entry Error")
okToValidate = False
DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow,
oldCurrentCol)
okToValidate = True
Else
oldCurrentRow = newCurrentRow
oldCurrentCol = newCurrentCol
End If
End Sub
Ken
----------------------------------
"jaYPee" <hi******@yahoo.com> wrote in message
news:40********************************@4ax.com... Thank you thank you very much for you help.
one more question and i'm done. in my datagrid i have checkbox located in column 6. how can i prevent the user to encode to this checkbox if the column 1 to 5 is not yet encoded?
i really really appreciate your help.
thanks once again...
On Mon, 26 Apr 2004 07:35:53 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
Change the DataGrid1_CurrentCellChanged procedure to this.
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged newCurrentRow = DataGrid1.CurrentCell.RowNumber newCurrentCol = DataGrid1.CurrentCell.ColumnNumber Dim newText As String
Try newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString() If newCurrentRow <> oldCurrentRow Then Dim x As Integer
For x = 0 To 2 Dim strTemp As String = DataGrid1(oldCurrentRow, x).ToString If strTemp = "" Then DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, x) Return End If Next End If Catch newText = "" End Try
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol, newText) Then MessageBox.Show("Entry Error") okToValidate = False DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, oldCurrentCol) okToValidate = True Else
oldCurrentRow = newCurrentRow oldCurrentCol = newCurrentCol End If End Sub
Ken ------------------- "jaYPee" <hi******@yahoo.com> wrote in message news:j6********************************@4ax.com. .. thanks for the code. however the problem is that when i navigate to the new row and don't enter any data and click to the other row (in your example from any of the row from 1st row to 3rd row) it returns an error No value at index 3.
and how can i make sure that when they add new record in this datagrid they have to enter 1st from the 1st cell then 2nd,3rd and so on..
thanks once again..
On Sun, 25 Apr 2004 19:08:46 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
http://www.onteorasoftware.com/downl...validation.zip
Ken ---------------- "jaYPee" <hi******@yahoo.com> wrote in message news:o4********************************@4ax.co m... >i have downloaded the sample of cell by cell validation from this site > http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c > sharp. > > anyone have a vb version of this sample program?
thank you thank you once again...
this is really what i need.
:)
jaYPee
On Mon, 26 Apr 2004 08:13:18 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
Try something like this
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged newCurrentRow = DataGrid1.CurrentCell.RowNumber newCurrentCol = DataGrid1.CurrentCell.ColumnNumber Dim newText As String
Try newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString() If newCurrentRow <> oldCurrentRow Then Dim x As Integer
For x = 0 To 2 Dim strTemp As String = DataGrid1(oldCurrentRow, x).ToString If strTemp = "" Then DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, x) Return End If Next End If Catch newText = "" End Try
If newCurrentCol = 2 Then For x As Integer = 0 To 1 Dim strTemp As String = DataGrid1(newCurrentRow, x).ToString If strTemp = "" Then MessageBox.Show("Please enter this value here first") DataGrid1.CurrentCell = New DataGridCell(newCurrentRow, x) Return End If Next End If
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol, newText) Then MessageBox.Show("Entry Error") okToValidate = False DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, oldCurrentCol) okToValidate = True Else oldCurrentRow = newCurrentRow oldCurrentCol = newCurrentCol End If End Sub
Ken ---------------------------------- "jaYPee" <hi******@yahoo.com> wrote in message news:40********************************@4ax.com.. . Thank you thank you very much for you help.
one more question and i'm done. in my datagrid i have checkbox located in column 6. how can i prevent the user to encode to this checkbox if the column 1 to 5 is not yet encoded?
i really really appreciate your help.
thanks once again...
On Mon, 26 Apr 2004 07:35:53 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
Change the DataGrid1_CurrentCellChanged procedure to this.
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged newCurrentRow = DataGrid1.CurrentCell.RowNumber newCurrentCol = DataGrid1.CurrentCell.ColumnNumber Dim newText As String
Try newText = DataGrid1(oldCurrentRow, oldCurrentCol).ToString() If newCurrentRow <> oldCurrentRow Then Dim x As Integer
For x = 0 To 2 Dim strTemp As String = DataGrid1(oldCurrentRow, x).ToString If strTemp = "" Then DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, x) Return End If Next End If Catch newText = "" End Try
If okToValidate And Not IsValidValue(oldCurrentRow, oldCurrentCol, newText) Then MessageBox.Show("Entry Error") okToValidate = False DataGrid1.CurrentCell = New DataGridCell(oldCurrentRow, oldCurrentCol) okToValidate = True Else
oldCurrentRow = newCurrentRow oldCurrentCol = newCurrentCol End If End Sub
Ken ------------------- "jaYPee" <hi******@yahoo.com> wrote in message news:j6********************************@4ax.com ... thanks for the code. however the problem is that when i navigate to the new row and don't enter any data and click to the other row (in your example from any of the row from 1st row to 3rd row) it returns an error No value at index 3.
and how can i make sure that when they add new record in this datagrid they have to enter 1st from the 1st cell then 2nd,3rd and so on..
thanks once again..
On Sun, 25 Apr 2004 19:08:46 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
>Hi, > >http://www.onteorasoftware.com/downl...validation.zip > >Ken >---------------- >"jaYPee" <hi******@yahoo.com> wrote in message >news:o4********************************@4ax.c om... >>i have downloaded the sample of cell by cell validation from this site >> http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c >> sharp. >> >> anyone have a vb version of this sample program? >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: esroinc |
last post by:
By creating an event that fires when I click on a cell, I am able to
obtain the coordinates of that cell, but I have not been able to get
the data or value in that cell.
cellCoordinates =...
|
by: Roger |
last post by:
I have a datagrid and would like to know what even fires when a cell is
changed?
I want to know when the user changes a cell and moves to the next. I have
some code that needs to be done to...
|
by: Bob |
last post by:
Vs 2005, VB.net, Datagridview1, cell column name is IsClosed and its a
checkbox. When I click on it to check it I need to be run a procedure to see
if it can stay checked if not I must cancel the...
|
by: Bob |
last post by:
In a datagridview (vs2005, VB.net) I have two columns that are checkboxes. I
need to check that only one of the two can be checked. Its not permissible
to have the two selected to true, but they...
|
by: Sujay Sil |
last post by:
hi,
i would like to know how to validate a cell value in a datagrid using c#. Suppose i have three cells in a datagrid and i want the second cell to be validated. If the value is incorrect as...
|
by: =?Utf-8?B?SiBTdHJlZ2Vy?= |
last post by:
I am working in a datagrid and I want to have an event fire whenever I change
a value of a cell. I currently have the event firing when the active cell
changes, but this means validation occurs...
|
by: Roach |
last post by:
VB.NET 2005 2.0 Framework application is using a DataGridView for SQL
data access and user data entry. As part of exception/error handling,
the app wants to advise the user when he/she enters a...
|
by: Romulo NF |
last post by:
Greetings,
I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
|
by: ravir81 |
last post by:
Hi,
I am currently working on excel validation using Perl. I am new to Excel validation but not for Perl. I have a question regarding one of the validation. Could anyone please tell me how to get...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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...
|
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...
| |