I connect an object to every line in the listboxes and the Comboboxes. The ToString() function of the object returns the text that ends up in the listbox. My problem is this.. When I update the object with new data, for example change the name, and the name is what is displayed in the list, the list doesnt get updated. I have tried to call different functions in the listbox, for example Update() and Refresh(), but i cant get the listbox to check the current value of ToString(). It seems to only check it when the object is added. So.. Do anyone know how to force the list to refresh the rows texts with the new values of the objects? Thank you!
Currently I am engaging in GIS (geographic information system) research work. My geodatabase design and implementation is based on dual systems. What is available around me is the .mdb and GIS applications. However, this can be also be done also within an integrated single database system (oracle spatial, informix or db2...etc), non of them are in PC or server.
Now, I am so keen to implement my GIS project in an SQL3-styled application.
Therfore, I would appreciate greately, if any body could offer me a guide on how to learn SQL3 practically either in the INTERNET or else.
Originally posted by charlie78
Oups.. :-) Im using VB .Net
Can see that the first post was back in December03... did you resolve this problem? I've hit exactly the same setback, when the custom data object is added to the list box the ToString() method is called correctly so that the text is added without a problem. But, if the object is updated I can't get the list box to update the text by calling the ToString() method of the custom data object.
Ok, here's a simple solution... Delete the object and then add it back to the ListBox. I'd like a neater way, but this works; and because we're adding the same reference object back into the ListBox, after deleting it, we're not affecting any variable(s) that have referenced that ListBox Item directly.
Here's some code... just create a Windows app with one form and add a single ListBox to the form... On running the app two data items are added to the list box, double click one, or both, and the Text in the object is changed... this change is shown in the ListBox.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim objData1 As clsData = New clsData("Test Data 1")
Dim objData2 As clsData = New clsData("Test Data 2")