|
-
Feb 16th, 2006, 07:54 AM
#1
Thread Starter
Addicted Member
Business Object
My boss has asked me to put functionality into an already populated datagrid, so that when a formula code is typed into the first cell of a row, and then the tab key is pressed, the remaining cells in the row then get automatically populated with the relevant data.
what would be the best way to go about this task?
He says I need to build a business/custom object!!! might as well ask me to build a space shuttle.
Would be grateful for any advice.
Thanks
-
Feb 16th, 2006, 10:11 AM
#2
Re: Business Object
I don't know much about data grids since I never use them but if it allows inpu t you should be able to simply check for when the Tab key is pressed and then run your code across the row. Should be fairly straight forward.
I am puzzled by one of your responses though.
He says I need to build a business/custom object!!! might as well ask me to build a space shuttle.
If it's like building a space shuttle, why are you programming for a living (and how)?
-
Feb 16th, 2006, 10:41 AM
#3
Thread Starter
Addicted Member
Re: Business Object
In other words I know nothing of building business objects or space shuttles.
-
Feb 16th, 2006, 10:48 AM
#4
Re: Business Object
 Originally Posted by soluga
In other words I know nothing of building business objects or space shuttles.
Why are you employed to do so?
-
Feb 16th, 2006, 10:54 AM
#5
Re: Business Object
Building business objects can be overwhelming at first. In theory, they should provide you with a business analyst that can explain what each object needs to hold and what functionality is necessary. Most likely, that won't be the case (it hardly ever is). What you need to do is design for reuse. Lay everything out and then start finding similiarities between the programs that will be associated with the business process. Those similarities are a great place to start.
-
Feb 16th, 2006, 11:10 AM
#6
Re: Business Object
Back to your question ( I totally missed the target ), there's a couple of ways to do this, but it depends on how you're currently populating your datagrid. What are you using for a datasrouce?
-
Feb 17th, 2006, 04:57 AM
#7
Thread Starter
Addicted Member
Re: Business Object
I was employed on my ASP skills, but have been asked to move into VB.Net.
Have been doing some digging, and the confusion was just a play on words, I have been using classes all along, creating functions and subs etc to be used in the forms, I just presumed business/custom objects were something different.
As regards my original question, I am using a Janus datagrid, with a dataset as the datasource (from my class of course). But think I may have cracked it, kasracer was right, as now have a function which tell my what cell I am in on my row, so when the tab key is pressed I can re-query the database to see if the code exists, if it does I can then populate the row with the data.
VB Code:
Private Sub GridExFormula_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles GridExFormula.KeyDown
Try
If e.KeyCode = Keys.Tab Then
Dim currentRow As GridEXRow
'Get current row
currentRow = GridExFormula.GetRow()
Dim CellText As String
CellText = currentRow.Cells(0).Text
IsInLastColumn(GridExFormula)
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Last edited by soluga; Feb 17th, 2006 at 06:00 AM.
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
|