Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

richardw48

@richardw48
About
Posts
19
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • google streetview
    R richardw48

    These are the jscript functions you need ... This function takes an address as a string

    function showAddress(thisaddress)
    {
    var geocoder = new GClientGeocoder();
    geocoder.setBaseCountryCode("uk");
    geocoder.getLatLng(thisaddress, gotPoint);
    searchaddress=thisaddress
    }

    The next function is called by the one above in order to show the address or marker on a map Note that I've commented out the code that places a marker at the point

    function gotPoint(pt)
    {
    if (!pt)
    {alert(searchaddress + " not found");}
    else
    {
    // map.setCenter(point, 13);
    // var marker = new GMarker(point);
    // map.addOverlay(marker);
    // marker.openInfoWindowHtml(thisaddress);
    document.formInput.txtPoint.value = pt;
    panoClient.getNearestPanoramaLatLng(pt, fnearestpano);
    }
    }

    Finally, the function finds the nearest StreetView image to the address

    function fnearestpano(latlng)
    {
    if (!latlng)
    { alert("nearest view not found"); }
    else
    {
    //alert("point=" + latlng);
    myPano = new GStreetviewPanorama(document.getElementById("pano"));
    myPano.setLocationAndPOV(latlng, myPOV);
    }
    }

    Hope that helps? Richard

    JavaScript javascript com tools tutorial question

  • Date formate in VB .net.
    R richardw48

    Instead of cmd = New SqlCommand("SELECT [Client ID] FROM client_details WHERE [Date of Joining] = '" + dateofj + "'GROUP BY [Client ID]", con) use: cmd = New SqlCommand("SELECT [Client ID] FROM client_details WHERE [Date of Joining] = @DateOfJ GROUP BY [Client ID]", con) cmd.Parameters.AddWithValue(@DateOfJ, YourDateValueHere)

    Visual Basic database csharp tutorial question

  • Process.start wait for a callback
    R richardw48

    Not sure if this will work but... could you not make prog1 com visible and then expose the function in prog1 that you want prog2 to call when it gets to a specific point in its processing? I've used this process to get jscript code sitting behind an Internet Explorer page to call a function in my vb.net app

    Visual Basic csharp help tutorial

  • tarverse binary tree
    R richardw48

    You need to find out about 'recursion' techniques

    Algorithms data-structures question

  • Datagridview changing the row backcolor based on value of coloum in the same grid view
    R richardw48

    Put your code into the cellformat event of the datagridview

    C# help css

  • open window using vb
    R richardw48

    You mentioned 'download it after clicking', so are you creating a web page/web application or a windows forms application?

    Visual Basic question csharp help

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    You still end up with the same problem, trying to convert row data into column data and matching it to the main table data. What version of MS Access are you using for your database? If it's 2003 or later then one course of action could be to create a Crosstab Query in MS Access for each of the tables that need the data rows converting into columns. You could then create a new Select Query to combine the data from the main table with that from the crosstab queries and then reference the Select query in your vb.net app instead of the main table. You would then not need to change your code to export to Excel.

    Visual Basic help question

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    Mmm... I figured you might have a many-to-one relationship somewhere. Unfortunately the datagridview displays its data on a row-by-row basis so as soon as you assign a datasource it will display the data from the table, row by row. It's possible to show hierarchical data in the datagrid view by having related records appear as part of the main record but not as extra/additional columns. Instead you'll have extra rows beneath the parent row but these rows will be 'contained' within and below the parent row. If you've managed to do everything I've said in the previous posts then all that's left to do now is to assign the datasource to the datagridview. Open the form that has the datagridview on it in design view. Select the datagridview and look at it's top-right corner, you should see a 'smart tag' appear. Click it and use 'Choose Data Source' to navigate to select the main table in your dataset. VS should then set up the data source automatically for you and you should be able to see the records displayed in the grid when you run your app. To see the datagridview display records hierarchically you need to assign the datagridview's datasource to be the object that represents the relationship between the main table and the sub-table(s). I wish I could see your tables structure and relationships then I'd be able to advise you better.

    Visual Basic help question

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    Forgot to ask... Do you have a one-to-one relationship between the main table and the sub-tables or are the relationships one-to-many, that is, each record in the main table links to more than one record in a sub table?

    Visual Basic help question

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    OK. 6 In the dataset designer click and select the main table (the one you've already used to fill the datagrid. 7 right-click on the TableAdapter row where it says Fill, GetData and choose 'Configure' 8 When a window appears you'll see the 'SELECT' statement for the query that VS uses to fill the table. 9 Click 'Query Builder' You'll now see a representation of your table showing all the fields in the top pane 10 Right click the top pane and choose 'Add table'. Do this for all the other tables you want to get data from 11 Now you need to link the 'Common ID fields' of all the tables. If you've set the primary keys correctly then these fields will be in bold type. To link the fields, click the key field in the main table and drag and drop it on to the corresponding field in one of the other tables. Repeat the process for the other tables. 12 Now click the check boxes next to the fields that contain the additional data you want to see in the data grid. When you do this you'll see the sql statement change. When you're done, click the OK button to close the Query Designer, then click Finish to close the TableAdapter Configuration window. 13 In the dataset designer, your main table should now contain the additional fields 14 Save the changes and close the dataset designer. Let me know when you've done the above.

    Visual Basic help question

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    Mmm, Don't know why you're doing it in code when you can use the 'visual' designers to accomplish the same thing more easily. I would do the following: 1 add a new dataset to your project using 'Add New Item'. Choose a name for it, like 'dsProducts' 2 when you can see the new dataset in Solution Explorer, double click it to open the dataset designer. 3. Open Server Explorer and use the wizard to create a new data connection to your access database. 4 Once created you'll be able to navigate in VS to see the tables in the access db. 5 click and drag each of the tables from the server explorer to the dataset designer. This will automatically create the table adapters you need for all the tables. See if you can get this far, then come back here

    Visual Basic help question

  • Need Help with the DirectoryServices namespace in .net 3.5
    R richardw48

    Sorry can't help with VS 2008/.Net 3.5 but you could always copy the code from the blog and try the auto-conversion to vb using this link http://www.developerfusion.com/tools/convert/csharp-to-vb[^]

    modified on Thursday, October 2, 2008 11:10 AM

    Visual Basic csharp html com windows-admin help

  • open window using vb
    R richardw48

    Do you want to automate Excel or just start it as a separate process/application?

    Visual Basic question csharp help

  • How Do I Add A New Column For Each Record From Table To Existing DatagridView
    R richardw48

    Which language? VB, C#? Which version of VS? 7, 8, 9? If v8 or later You could use a TableAdapter with ClearBeforeFill set to False provided that the primary keys of all tables have as you say "common and unique values"

    Visual Basic help question

  • To remove xmlns value from Xml file
    R richardw48

    In vb.net I use the following: Dim ns As New XmlSerializerNamespaces ns.Add("", "") 'empty strings required to prevent default namespace declarations appearing in xml file

    Visual Basic xml help tutorial

  • Preferred "updating" paradigm with WinForms
    R richardw48

    If the updating via the web service is going to take a long time ie keep the user waiting, then ideally you should do the update on a different thread from that of the UI. In VS 2005 you can use the BackgroundWorker control for this purpose. A quick and dirty solution would be to lock down the UI and use a PictureBox control to display the 'updating' gif as in Ajax or alternatively use a ProgressBar.

    Windows Forms csharp winforms question

  • Passing data between layers
    R richardw48

    Not sure if this suggestion is on the right track but if you use VS2005 then the GetData method of a TableAdapter will return a table object that contains both the data and the table schema from the database. You can use an sql statement to limit/filter the rows too.

    Article Writing database question csharp sql-server design

  • expose the data adapter hidden by the table adapter
    R richardw48

    Mmmm ... Are you wanting to intercept the saving of data to the database or just looking to get the table's rowchanged event?

    Visual Basic csharp database tutorial

  • 2 combobox from same data source & same data table in VB.Net2005
    R richardw48

    Each combo requires its own separate dataview as the datasource. The two dataviews 'point' to the same table. If you don't do this then each combo is using the table's default dataview as the datasource and a selection in one combo then affects the contents of the other. -- modified at 10:26 Sunday 19th August, 2007

    Visual Basic help csharp question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups