|
Youre trying to treat that ComboBox like it's the same one you drop on a form. It's not. That combo is buried under a DataGridViewComboBoxCell as the cell's Edit Control, which is buried under a DataGridViewComboBoxColumn.
What do you think you need this for?? Under any normal circumstances, if your dataset/datatable, dgv is configured correctly, you would never need to handle this event.
|
|
|
|
|
use the event cellendedit.
Dim indexcombo As Integer = 0
If e.ColumnIndex = 0 Then<br />
indexcombo = CType(Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewComboBoxCell).Items.IndexOf(Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString)<br />
End If<br />
valoareCombo = Me.dgvTipuriColoane.Rows(e.RowIndex).Cells(e.ColumnIndex).Value
where the indexcombo is the index you choosed in combo.
|
|
|
|
|
That's why I asked him why he needs this. Your using an event that doesn't fire until the new value is commited to the cell. Is he looking for that?? Or is he looking to find out BEFORE the value is commited?? That's why I asked...
|
|
|
|
|
Hi everybody.
I Have two web applications that share several dll´s.
After reading about the way to avoid duplicated ocurrences of dll´s in each \bin folder of the aplications, I have decided to add the common dll´s in the GAC.
Ok it´s right, I have de dll´s in the Global Assembly Cache, but the web aplications doesn´t work.
Can anybody say me something about?, What am I doing wrong?, Is it necessary to modify something for the aplications to get access to the GAC?.
Is a matter of IIs configuration or is a programatic issue?.
Is the GAC the right way to get this sharing?.
Is there any other way to do so?.
Thanks in advance.
|
|
|
|
|
If you have an assembly being used by more than one application then yes the GAC is the way to go. u can also have multiple version of the same dll installed, something that was impossible before .net. Wat i do not understand however is wat you mean when you say the application doesn't work. Not working could be a result of many things from getting an error to getting wrong results. If you are getting an error, then wat does it say? your question in its current state is vague and almost impossible to answer. Could you please provide more information on the 'Not Working' part.
|
|
|
|
|
Ok Mbire, thanks for your answer. Sorry if I din´t write more specific details. I was not sure that could be relevant.
In a first situation I have two applications, each one with its own \bin folder containing a number of dll´s.
After adding the dll´s to the GAC, I have deleted both applications \bin folder.
Now when I try lo load the main page of one of them I receive this error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ItemsChoiceTypeLogOn' is not defined.
Source Error:
...
Line 72: <xmlelementattribute("itemselementname"), xmlignoreattribute()=""> ByRef ItemsElementName() As ItemsChoiceTypeLogOn _
...
Source File: D:\MTscada\www\ServerTorres\App_Code\IEC61400WebService.vb Line: 72
I guess that Internet Information Server doesn´t find the adecuate dll, because if I restore the \bin folders with the dll´s inside, both applications work fine.
|
|
|
|
|
|
|
|
I have made a system which is Ordering System, I'm still a student and on Monday October 15, 2007 is my defend. My system can display datas in the listview into the textboxes on 'click' event but I want to display one single row of datas in the listview into the textboxes at form load.
here's my code:
Public Sub passToTextbox()
Try
With Me
txtCustID.Text = lstCust.SelectedItems.Item(0).Text
txtCompName.Text = lstCust.SelectedItems.Item(0).SubItems(1).Text
txtContactName.Text = lstCust.SelectedItems.Item(0).SubItems(2).Text
txtContactTitle.Text = lstCust.SelectedItems.Item(0).SubItems(3).Text
txtAddress.Text = lstCust.SelectedItems.Item(0).SubItems(4).Text
txtPostalCode.Text = lstCust.SelectedItems.Item(0).SubItems(5).Text
txtPhoneNo.Text = lstCust.SelectedItems.Item(0).SubItems(6).Text
txtFaxNo.Text = lstCust.SelectedItems.Item(0).SubItems(7).Text
End With
Catch ex As Exception
MsgBox("Establishing database connection...", vbOKOnly, "System")
MsgBox("Fetching database records...", vbOKOnly, "System")
End Try
End Sub
Private Sub lstCust_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstCust.MouseClick
passToTextbox()
End Sub
Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oCustFacade.loadToList(lstCust)
passToTexbox()
LockUnlock(2)
ButtonCtrl(3)
lstCust.FullRowSelect = True
End Sub
>>>>>> hope for a reply as soon as possible
>>>>>> may GOD bless us...
|
|
|
|
|
I'm not sure what the problem is but I'm guessing the load doesn't work.
At first sight I'd say you forgot to select a row in the load before you call the function passtottextbox (since this function uses the selecteditems property you must have at least 1 selected for it to work)
try something like this (not real code)
Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oCustFacade.loadToList(lstCust)
lstcust.selectedrow = 1
'or
lstcust.items(0).select
passToTexbox()
LockUnlock(2)
ButtonCtrl(3)
lstCust.FullRowSelect = True
End Sub
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Hi,
I did not quite understand your question but i think you could do it this way.
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
if lstCust.Items.Count<>0 then
txtCustID.Text = lstCust.Items(0).Item(0).Text
txtCompName.Text = lstCust.Item(0).SubItems(1).Text
...
end if
End sub
So u will simply be taking the first item on the List view, which has an index of 0. the only difference from wat you are already doing after the click event is that we are considering items that have not yet been selected hence we leave out the Selected method.
From the code you submitted, i see you have a statement block
With Me
...
End With
The block is not necessary, i think you should remove those 2 lines coz they are not serving any purpose wat so ever. They would be useful if u wanted to use methods or properties only using the (.) operator without specifying the container object.
|
|
|
|
|
Hi guys,
I am trying to add a reference to a Java Web service in my VB.Net project application, but after entering the url of the wsdl file, i get this error:
There was an error downloading 'http://myServer:8080/axis/ThisWebService.jws?wsdl'.
The request failed with HTTP status 503: Service Unavailable.
I have mySevevr included in the proxy server exception list in Internet Explorer. Please assist.
Regards
Apunyaira haashaye misodzi
|
|
|
|
|
Its becoming a curse for me on this forum of finding solutions to my problems. In this case, I had to change and use the server 'IP address' instead of the server name 'myServer'. The proxy server was not resolving the IP address correctly given the server name.
|
|
|
|
|
how i can export report from vb6 to excel
|
|
|
|
|
do u mean crystal report?
|
|
|
|
|
hai every one,
i need auto complization controls like(textbox,combobox,listbox....)
in my need is
when i type the word in textbox,combobox or some thing like that
i want to show the list corresponding when i type the character in textbox...
below the textbox etc...
or
when i type the character in textbox full word is displayed in the textbox etc.,
please tell me the solution
thank you
ganash
|
|
|
|
|
check out the property's autocompletemode/autocompletesource/autocompletecustomsource
they do exactly what you want (at least for textbox and combobox haven't tested it with anything else)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Hello
I have to pass parameters to crystal report at runtime,i have already created reports in crystal report 9,below is my code
Dim reportdocument As New ReportDocument
Dim strRptPath As String
strRptPath = "d:\Attendance System\Attendance Reports\TodayAbsRpt.rpt"
reportdocument.Load(strRptPath)
Dim paramdefs As ParameterFieldDefinitions
Dim paramdef As ParameterFieldDefinition
Dim paramvalues As New ParameterValues
Dim paramdisval As New ParameterDiscreteValue
Dim todayval As Long
todayval = Me.DTPsdate.Text.Substring(6, 4) & Mid(Me.DTPsdate.Text, 4, 2) & Me.DTPsdate.Text.Substring(0, 2)
paramdefs = reportdocument.DataDefinition.ParameterFields
For Each paramdef In paramdefs
With paramdef
Select Case .ParameterFieldName
Case "DpttNm"
paramdisval.Value = "'" & Me.cmbDptt.Text & "'"
paramvalues.Add(paramdisval)
paramdef.ApplyCurrentValues(paramvalues)
Case "pDate"
paramdisval.Value = todayval
paramvalues.Add(paramdisval)
paramdef.ApplyCurrentValues(paramvalues)
End Select
End With
Next
Dim frm As New FrmRpt
frm.crViewer1.reportSource=reportdocument
frm.Show()
the crystal report viewet is on another form ....the problem is that the crystal
report viewer doe'snt load the report
please help me ur corporation is highly appreciated
thanks
|
|
|
|
|
Please add a single line after the following Line:
frm.crViewer1.reportSource=reportdocument;
crViewer1.Show();
frm.Show();
|
|
|
|
|
Hi,
does anyone know hot to join two arrays into a third final array?
The end of the first arrays is the start of the second array.
Thanks!
|
|
|
|
|
You could write a function
Private Function JoinArrays(Array1() as string, Array2() as string) as string()<br />
dim Array3() as string<br />
for count as integer = 0 to Array1.length - 1<br />
Array3(count)=Array1(count)<br />
next count<br />
<br />
for count =0 to array2.length - 1<br />
array3(array1.length+count)=array2(count)<br />
next count<br />
return array3<br />
End Sub
|
|
|
|
|
A simpler way to do it:
Public Shared Function JoinStringArrays(ByVal source1 As String(), ByVal source2 As String()) As String()
Dim newArray(source1.Length + source2.Length - 1)
source1.CopyTo(newArray, 0)
source2.CopyTo(newArray, source1.Length)
return newArray
End Function
|
|
|
|
|
hi All
i would like to know how to design a Function that accept parameters and return a dataset. Inputs are from a textbox.
please provide example code or article or Tutorial
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: i would like to know how to design a Function that accept parameters and return a dataset. Inputs are from a textbox.
Where the information initially came from is unimporant to the method, it will know nothing about your text box.
Public Function MyFunction(someText As String) As DataSet
Dim result As DataSet
' Do stuff to generate the dataset and assign it to result
Return result
End Function
|
|
|
|