Click here to Skip to main content
15,913,685 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: hi : string.startwith doesn't work ????? Pin
Ranoush10-Jul-05 3:38
Ranoush10-Jul-05 3:38 
GeneralRe: hi : string.startwith doesn't work ????? Pin
SmartSDR10-Jul-05 3:48
SmartSDR10-Jul-05 3:48 
Generalkeypress event Pin
vidyashankar10-Jul-05 0:18
vidyashankar10-Jul-05 0:18 
GeneralRe: keypress event Pin
S. Senthil Kumar10-Jul-05 3:48
S. Senthil Kumar10-Jul-05 3:48 
Questionhow to rearrange the grid display in input using oledb method Pin
vidyashankar10-Jul-05 0:16
vidyashankar10-Jul-05 0:16 
Generalset a Dll as a MDI Child Pin
9-Jul-05 21:43
suss9-Jul-05 21:43 
GeneralRe: set a Dll as a MDI Child Pin
Dave Kreskowiak10-Jul-05 8:15
mveDave Kreskowiak10-Jul-05 8:15 
QuestionHow to call a sub Pin
erikkl20009-Jul-05 14:51
erikkl20009-Jul-05 14:51 
Hello All,

I need help to import sub into application.
First i will give a little detail how my application is set so you can help me (And so if i ask this question wrong you may be able to sift through the newbieness)
I have a componts folder that holds all of my class files (Like my comtrols, alot of my controls have their own namespace, class file)
My connection string is in my web.fig file so when ever i create a connection in my class files in my componets folder i write it like so--->... Dim cnn As New SqlConnection(ConfigurationSettings.AppSettings("cnn")) ...
When ever i call the function that returns a result for my control i do it like so-> ... Dim GetCompanyProductsFromTopMenu As New ConstructionSuperCenterCom.WindowTreatmentByCompany

dlCom16.DataSource = GetCompanyProductsFromTopMenu.DataListForProductDisplayFromTopMenuSelection(IDCompany, IDCompanyProductCategory)
dlCom16.DataBind()...


Now, My question here is, how do i get to this sub and correctly implement it?
What i am doing here updating, editing, deleting info from a datagrid and i want to move all of this code to my componets folder and make a call from the behind file to the componts in the folder where needed in the behind file.

============Here is a piece of the code from the behind file that i am wanting to move to the componets folder,-----

Sub dgProducts_Edit(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgUpdateProductRestrictions.EditItemIndex = e.Item.ItemIndex
BindData()
End Sub

Sub dgProducts_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgUpdateProductRestrictions.EditItemIndex = -1
BindData()
End Sub

Sub dgProducts_Update(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
'Read in the values of the updated row
Dim iProductID As Integer = e.Item.Cells(1).Text
Dim dblPrice As Double = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Dim strName As String = CType(e.Item.Cells(3).Controls(0), TextBox).Text
Dim strDesc As String = CType(e.Item.Cells(4).Controls(0), TextBox).Text


**How would i call the sub dgProducts_Update from the behind file?

Like This----> Dim MyUpdate as new (This would be namespace --->ConstructionSuperCenterCom)
MyUpdate.dgProducts_Update <----------????? i tried this but did not all the way work..

Can anyone help me on this???

Thank you...
Erik.,,..
GeneralFormatting Question Pin
erikkl20009-Jul-05 9:21
erikkl20009-Jul-05 9:21 
GeneralRe: Formatting Question Pin
Rob Graham9-Jul-05 17:12
Rob Graham9-Jul-05 17:12 
GeneralRe: Formatting Question Pin
erikkl20009-Jul-05 17:32
erikkl20009-Jul-05 17:32 
Generalactivex Pin
_tasleem9-Jul-05 4:09
_tasleem9-Jul-05 4:09 
QuestionGetTickCount in VB.net 2005? Pin
rushing8-Jul-05 21:21
rushing8-Jul-05 21:21 
AnswerRe: GetTickCount in VB.net 2005? Pin
S. Senthil Kumar8-Jul-05 22:25
S. Senthil Kumar8-Jul-05 22:25 
QuestionHow to set default button in a winform? Pin
rushing8-Jul-05 20:45
rushing8-Jul-05 20:45 
AnswerRe: How to set default button in a winform? Pin
S. Senthil Kumar8-Jul-05 22:21
S. Senthil Kumar8-Jul-05 22:21 
GeneralServer Client Application Pin
AdityaWardha8-Jul-05 20:00
AdityaWardha8-Jul-05 20:00 
GeneralRe: Server Client Application Pin
Dave Kreskowiak9-Jul-05 2:39
mveDave Kreskowiak9-Jul-05 2:39 
QuestionHow to customize unique constraint exception? Pin
Anonymous8-Jul-05 19:08
Anonymous8-Jul-05 19:08 
AnswerRe: How to customize unique constraint exception? Pin
Anonymous9-Jul-05 7:26
Anonymous9-Jul-05 7:26 
QuestionHow to make your application start before windows starts Pin
TheOnlyFalcon8-Jul-05 15:30
TheOnlyFalcon8-Jul-05 15:30 
AnswerRe: How to make your application start before windows starts Pin
Rob Graham8-Jul-05 18:03
Rob Graham8-Jul-05 18:03 
AnswerRe: How to make your application start before windows starts Pin
Dave Kreskowiak9-Jul-05 2:09
mveDave Kreskowiak9-Jul-05 2:09 
GeneralRe: How to make your application start before windows starts Pin
TheOnlyFalcon10-Jul-05 15:41
TheOnlyFalcon10-Jul-05 15:41 
GeneralRe: How to make your application start before windows starts Pin
Dave Kreskowiak10-Jul-05 17:04
mveDave Kreskowiak10-Jul-05 17:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.