|
-
Aug 12th, 2003, 10:00 AM
#1
Thread Starter
Lively Member
String value from column in grid
I'm tring to do something that I thought would be fairly simple until ....... oops I remembered I was trying to do it in .NET. I have a grid (Ultragrid from Infragistics) I have te grid working just fine. When the user enters a new row I would like to place the data entered in a particular field into a string. I'm very new to .NET and I seem to be more and more clueless as each day passes. Here is the code I have so far:
Private Function ValidLastName(ByVal e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) As Boolean
If e.NewValue = "" Then
MessageBox.Show("You must enter a last name before continuing")
e.Cancel = True
Return False
Else
Return True
strLast = e.NewValue(ToString)
End If
End Function
When I debug to check the values & hover over e.NewValue(ToString) it shows: e.NewValue = "Name" {String}
I just want the strLast to be able to be populated with the value in the grid.
I have dim'ed strLast at the beginning of the class. I'm missing something & can't figure out what I'm doing. Any help please?
Thanks,
Corinne
-
Aug 12th, 2003, 07:33 PM
#2
Hyperactive Member
Dont know the particular control you refer to but if it is derived from the basic datagrid class, in he datagrid class, I would use as follows:
dim currow as integer.
dim thisname as string
currow = datagrid1.currentrowindex
thisname = DataGrid1.Item(currow, 0)
if trim(thisname).length = 0 then
your error code
-
Aug 15th, 2003, 07:19 AM
#3
Thread Starter
Lively Member
Thanks for your suggestion, I'll try that.
Corinne
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|