Recoil's Profile User Rating: -----

Reputation: 25 Craftsman
Group:
Active Members
Active Posts:
296 (0.12 per day)
Joined:
28-June 08
Profile Views:
5,569
Last Active:
User is offline Yesterday, 07:50 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Nintendo
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Recoil has not set their status

Posts I've Made

  1. In Topic: Add items to a data repeater from directory

    Posted 30 Mar 2015

    Yes, originally I wanted to set the .tag on the Load button that was already on the ItemTemplate.

    The .tag for each one is the same as the lbl_Name.text that is on the template.

    When I initially set the tag I used "Button1.tag = xmlFile...<Adv_Name>.Value" but that was using the same tag on every listing in the DataRepeater. That is when I thought creating the button would help, but that was when I ran into the issue of the button only displaying on the first listing.

    Now here is what I have:

    Private Sub populate()
    
            datarepeater1.Controls.Clear()
    
            txt_Description.DataBindings.Clear()
    
            lbl_Name.DataBindings.Clear()
    
            pbx_Icon.DataBindings.Clear()
    
            Dim _emptable As New DataTable
    
            _emptable.Columns.Add("Name")
    
            _emptable.Columns.Add("Description")
    
            _emptable.Columns.Add("IconURL")
    
            For Each Dir As String In Directory.GetDirectories(Application.StartupPath & "\" & "Docs")
    
                Dim xmlFile = Xdocument.Load(Dir & "\" & "Data.xml")
    
                Dim dr As DataRow = _emptable.NewRow
    
                dr("AdventureName") = xmlFile...<DocName>.Value
    
                dr("AdventureDescription") = xmlFile...<DocDescription>.Value
    
                dr("IconURL") = xmlFile...<Adv_Icon>.Value
    
                _emptable.Rows.Add(dr)
    
                lbl_Name.DataBindings.Add("Text", _emptable, "Name")
    
                txt_Description.DataBindings.Add("Text", _emptable, "Description")
    
                pbx_Icon.DataBindings.Add("ImageLocation", _emptable, "IconURL")
    
                datarepeater1.DataSource = _emptable
    
                Button1.DataBindings.Add("Tag", _emptable, "Name")
    
            Next
    
        End Sub
    
    
    


    All the listings are showing on the DataRepeater with each Load button. Now it is accessing an empty string on the first listings Load button, but the second listings Load button is displaying properly.

    For some reason when I use "MsgBox(datarepeater1.CurrentItem.Controls("Button1").Tag.ToString)" to see what the tag is the message box doesn't show up, and only the first listing in the DataRepeater shows up.

    Spoiler


    ***Edit to add*** I got it fixed. I was supposed to add the datasource AFTER everything -_- :

    Button1.DataBindings.Add("Tag", _emptable, "Name")
    datarepeater1.DataSource = _emptable

    Thanks again CharlieMay!
  2. In Topic: Add items to a data repeater from directory

    Posted 30 Mar 2015

    I am running into 1 more issue with this. Currently I have everything displaying correctly on the DataRepeater. However, when I change the .tag on the "Load" button it is only accessing the first tag (i.e the second listing has the same Load button but when clicked it is using the .tag from the first listing).

    So I have removed the "Load" buttons and have created them through the For/Next statement:

    Private Sub populate()
    
            datarepeater1.Controls.Clear()
    
            txt_Description.DataBindings.Clear()
    
            lbl_Name.DataBindings.Clear()
    
            pbx_Icon.DataBindings.Clear()
    
            Dim _emptable As New DataTable
    
            _emptable.Columns.Add("Name")
    
            _emptable.Columns.Add("Description")
    
            _emptable.Columns.Add("IconURL")
    
            For Each Dir As String In Directory.GetDirectories(Application.StartupPath & "\" & "Docs")
    
                Dim xmlFile = Xdocument.Load(Dir & "\" & "Data.xml")
    
                Dim dr As DataRow = _emptable.NewRow
    
                dr("AdventureName") = xmlFile...<DocName>.Value
    
                dr("AdventureDescription") = xmlFile...<DocDescription>.Value
    
                dr("IconURL") = xmlFile...<Adv_Icon>.Value
    
                _emptable.Rows.Add(dr)
    
                lbl_Name.DataBindings.Add("Text", _emptable, "Name")
    
                txt_Description.DataBindings.Add("Text", _emptable, "Description")
    
                pbx_Icon.DataBindings.Add("ImageLocation", _emptable, "IconURL")
    
                datarepeater1.DataSource = _emptable
    
                Dim loadBtn As New Button
    
                loadBtn.Text = "Load"
                loadBtn.Tag = dr("DocName")
                loadBtn.Size = New Size(75, 30)
                loadBtn.Location = New Point(427, 3)
    
                AddHandler loadBtn.Click, AddressOf btn_Load_Click
    
                datarepeater1.CurrentItem.Controls.Add(loadBtn)
    
            Next
    
        End Sub
    
    


    While the .tag on the first Load button is working, now it is only adding the Load button on the first entry on the DataRepeater, even though all the other items for the other entries are displaying correctly.
  3. In Topic: Add items to a data repeater from directory

    Posted 30 Mar 2015

    After I declared the datatable and assigned the columns, I created the datarows inside my For/Next code block and it is working like I needed. Thanks for the example CharlieMay!
  4. In Topic: Seasoned VB.NET Developer Needed to take over a project

    Posted 18 Sep 2013

    Not really, I'm not paying...they can charge whatever they need to for copies of the program. It is an already established program. Version 1 was just a small, but complex calculator. Version 2 failed horribly because I was using Access for the DB, and 64bit users had too much trouble running it, and I never had the time to switch everything over to SQL.

    Right now all the developer would need to do is finish out the stuff lined up for version 3, or just change it all together if they want to. It's really up to them how much work they wish to invest in it.

    Without making a long drawn out post about everything that I had planned on doing, it's actually about 40% completed. Like I said I just don't have the time anymore to code because my 2 autistic children take up so much of my time. If I were to finish it I could do it in less than a week, but it really all depends on the programers ability, and what direction they wish to take the application.

    This is really just an offer for someone else who does have the time.
  5. In Topic: Uncheck other listview items on tab control tabs

    Posted 13 Sep 2013

    View Postybadragon, on 13 September 2013 - 09:34 AM, said:

    Your welcome! I'm glad you figured it out, and thank you for coming back and showing your solution! :D/>


    I remember when I first found this site. I would post a question, then search google more, often coming across my own post!

    I figure posting my solution might help someone else who is looking up similar terms that my post contains if they run into a similar issue. This place is awesome, and if more people follow suit then it makes it much easier for everyone ;)

My Information

Member Title:
D.I.C Regular
Age:
34 years old
Birthday:
August 21, 1980
Gender:
Location:
Tennessee
Interests:
Cake decorating
Martial Arts
RPG games
Years Programming:
3
Programming Languages:
VB.NET

Contact Information

E-mail:
Private
Website URL:
Website URL  http://
Yahoo:
Yahoo  taledus@yahoo.com

Friends

Comments

Recoil has no profile comments yet. Why not say hello?