Recursive TreeView Iteration Duplicating?

Jan 9, 2009

I'm designing an app that resets permissions on folders so I've made a treeview that uses GetDirectories to populate itself with all folders on a user's computer. The TreeView has the "checkboxes" property set to true so the idea is that users select all of the folders from this treeview that they want to reset permissions on and then click go.

So once they click go I need to loop through all nodes in the treeview and all subnodes etc and test to see if they are checked, then if they are I want to add each node to a list and then in the next routine I would loop through the list and reset the permissions.This is what I am doing at the moment but I keep finding that the objects added to my list are duplicated.For example if I select C:Test and C:TestTest2 in my treeview then I end up with my List looking like this:

[Code]...

View 12 Replies


ADVERTISEMENT

Exiting From A Recursive Sub Procedure Without Finishing All Iteration

Jan 2, 2009

I've been applying some recursive techniques to the second version of my app. This recursive procedure simply iterates through all nodes in a tree view and tests whether the text in the "department text box" matches the text name of a particular node. If there is a match, then the user's name, stored in the "name" variable, is added as a node to the node that has the same name as the department text box text.

[Code]...

View 5 Replies

TreeView Recursive Directory Mapping?

Apr 12, 2011

I have to map a directory with all subdirectories and their subdirectories and so on, all in a treeview.

I have this code but it has a "small" bug, is not done well.

[Code]...

View 4 Replies

VS 2008 : Optimize Recursive Treeview With AddRange?

Jun 23, 2009

I have this seperate class to fill a treeview from my database.There are over 33000 records and when this class runs, it takes almost 1 minute to finish.When i run this query from the server it takes for 5 seconds to retrieve all items.Is there a way to optimize this class?

Option Explicit On
Option Strict On
Imports System.Windows.Forms

[code]....

View 19 Replies

VS 2008 - Checkbox On Treeview - Collapse And Expand Treeview When Click Plus Sign (+) On Treeview

May 14, 2011

I have a problems with my application..

1. collapse and expand treeview when i click plus sign (+) on treeview, treeview didn't expand subfolder but when i click image, treeview expand it.

2. showing path that i check on treeview when i check the treeview then i'm click the button, then return path that i check

This is my code..

View 2 Replies

.net - Duplicating Rows In Database

Jan 14, 2011

For some reason, the if statement below is not working ''# count if records with this user already exist in the database below objSQLCommand = New SqlCommand("select count(id) as record_count from table1 where user

[Code]...

View 1 Replies

Add Record To Acess Is Duplicating?

Nov 4, 2010

frmAddUser is a simple form that is opened as a dialog by a command button on the primary form (frmPrimary). Once opened, it's only job is to collect information via textbox and combobox fields. Once submitted, the information is added to the database.

This works, or so I thought. If I open this form, fill it out, and submit the information; the record is created. However, if I turn around and do it all again with different information, another record is created but with the previous information (not the new). It will continue to make records as long as I keep submitted this form but no matter what information I put in, it always uses the original information that was used to create the first record.[code]...

View 14 Replies

Asp.net - Duplicating DropDownListItems Without Looping

Jul 22, 2009

This works like a charm... loading DropDownList2 with all the items from DropDownList1 without looping:

DropDownList2.DataSource = DropDownList1.Items;
DropDownList2.DataBind();

But, the data from the item text of DropDownList1 is copied into both the text and value fields of DropDownList2. Is there anyway to get both the text and the value fields to populate properly?

View 2 Replies

Crystal Reports Keeps Duplicating

Mar 15, 2012

The "Details" fields keeps repeating itself for example its showing it 4 times instead of one!this is my code[code...]

View 7 Replies

Duplicating A VB Project To A New Directory

Dec 21, 2010

I want to start a new development thread so I can maintain two versions of a solution. I set up a new directory next to the old and copied the contents of the existing directories into the new. That's all well and good but now I can't update references in the new project to the new directories. I remove a .DLL and when I add it again, it keeps including the .DLL from the old path.

I'm running VS2005 and the solution is made up of 5 or 6 different projects (if that makes a difference.)

View 5 Replies

Wpf - ListBox ObservableCollection Duplicating?

Aug 18, 2011

I have a WPF application which has a listbox bound to an ObservableCollection which retrieves it's data from a Database. I am attempting to have the ListBox data refreshed every minute through the use of a DispatcherTimer.

Dim dispatcherTimer As DispatcherTimer = New System.Windows.Threading.DispatcherTimer
AddHandler dispatcherTimer.Tick, AddressOf getRoomMeetingDetails
dispatcherTimer.Interval = New TimeSpan(0, 2, 0)
dispatcherTimer.Start()

[Code]...

View 1 Replies

.net :: Update Panel Duplicating Controls?

Feb 25, 2011

My code looks like this:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAddIsotope" EventName="Click" />

[code].....

View 1 Replies

Crystal Report Duplicating In Details?

Feb 27, 2012

so I have a template in Crystal reports using vb.net, I changed my data source location and that source still contains the needed tables for my report, the problem is this... My original template displays the exact report but when I changed its data source it duplicates the data in the details section(e.g I made a query that will show 1 item only,but instead I get 4).

Here is a screenshot of my problem: [URL]

I want to alter the template rather than to make another one

View 1 Replies

Duplicating Text Entries Automatically?

May 17, 2012

how to make a form quicker to fill out for my work, and it involves having a employee enter a patient's name in one text box, and then having that information duplicated in all other name text boxes.

function FillName(f) {
{
f.FillNameBox1.value = f.wholename.value;
f.FillNameBox2.value = f.wholename.value;
}
}

View 3 Replies

Forms :: Duplicating Windows Form?

May 5, 2010

I have a windows form that is set up like one big calendar for the month of may.when you click on May 1st...another form (form2) opens up with some combo boxes and a datagridView on it. What I need to do is on Form 1 (my calendar form)when you click on May 2nd...I want to open a duplicate form 2..the one with all the combo boxes on it.do I have to make 30 duplicate forms ( for 31 days of May)or is there an easier way to make sure that when the user clicks on May2...they dont get a form filled with May1 stuff.I can see that there is going to be a problem as it sits now because I am going to be adding to form 2 some kind of date box, or a date field in my gridview..So I need each form to display the right date?

View 8 Replies

IE Duplicating A Server Side Break

Nov 4, 2010

I have a issue with two breaks < Br /> appearing in IE,If I have a normal break placed like so.[code]Then looking at the source code for IE, it produces two Once which has a ID of brAddAnotherQuote and one which is simple "< br />" directly under it.This doesn't happen in Firefox

View 1 Replies

Asp.net - Bulk Copy Duplicating Each Row When It Is Added To Database

Feb 22, 2011

Why is my bulk copy duplicating each row, so in my database table the row shows twice.

Label1.Visible = True
Dim tourid As New List(Of String)
tourid.Add(TextBox1.Text)

[Code]......

View 1 Replies

Duplicating Effort By Uploading Even If The File Exists?

Jun 18, 2010

I am new to vb-net and am self-teaching and developing an application to combine a number of tasks which use different apps at the moment. I have a routine to ftp upload files but I am duplicating effort by uploading even if the file exists. Is there a simple "file exists()" type solution similar to:

If System.IO.File.Exists(strPic) = True Then so that file is only uploaded if it does not already exist?

View 3 Replies

.net - Duplicating Effects: Dreamweaver Pong Easter Egg Beep?

Dec 28, 2009

I don't want to actually MAKE the pong easter egg, but for anyone with Dreamweaver, try typing 'dreamweaver' into the color selection box to play a round of pong.The bit that I want to know how it works is the bit at the end once you lose.After your loss, it will immediately play a small tune, whether or not your volume is on. In fact, it plays whether or not you have speakers, which makes me think the sound card itself is playing the tune.How can you achieve a similar effect, playing notes without sound or speakers, in vb.net? I would imagine this requires P/Invoke, seeing as there is no obvious way inside the framework.I don't need a whole song, a simple beep or the ability to change frequency of the beep will suffice.

View 1 Replies

VS 2008 Nested Loop Duplicating ListView Items?

Jul 29, 2010

I'm gathering a list of files within a directory and then adding them to a ListView:

VB.NET

For Each f In Directory.GetFiles()
Dim lvi As New ListViewItem
lvi.Text = f.Name

[code]....

The exclusion list works great, but it duplicates each item in the ListView several times. How many depends on how many items that it excludes.

I understand why it's happening, but I can't figure out a way around it. I have to loop through the items in the ArrayList so that I can compare them to the other items.

View 5 Replies

How To Iteration In Vb

Jun 26, 2011

i am developing a program in visual basic 2010, it involves a non- linear iteration of one of the two variables with a step of .00 and a match at the .000 (3rd) decimal placethere cannot be an exact match between the 2 variable's values but i need the iteration to stop at the nearest possible value.

View 6 Replies

Iteration Using The Do-Loop?

Nov 15, 2011

I just can't seem to understand when i am suppose to put Accept outside the LOOP and when i'm suppose to Accept inside the LOOP at the beginning.

View 4 Replies

Using The Iteration Variable?

Jan 23, 2012

Is the warning I am receiving about using the iteration variable in this line a concern.

Dim reportdataforpage = (From reportvar In reportdata Where reportvar.reportpage = pagenum)

View 5 Replies

Assign One Value To Whole Array Without Iteration Through It?

Aug 25, 2009

how to assign one value to whole array without iteration through it? for example a i have pArray (5000,5000) =1 where all members off array = 1.

View 2 Replies

DataGridViewColumn Iteration Speed?

Jun 13, 2012

I have noticed that when iterating DataGridViewColumns, the speed is greatly reduced if the columns are visible.

For Each col As DataGridViewColumn In cData.DataGridView.Columns
col.Visible = visible
Next

If visible is set to false (and all columns are all currently visible), iterating 264 columns takes around 0.35s, however, if visible is set to true (and all columns are currently invisible), the same process takes around 30s.Does anyone know what would be causing the extra time?Could it something internal to the DataGridView Control?

View 5 Replies

Does A For-Each Loop Have An Iteration Count

Jun 18, 2009

Does a For-Each loop in VB have an iteration count, or would I have to do that myself?

View 5 Replies

How To Skip To The Next Iteration In A For Loop

Nov 10, 2009

I've got a for loop. In my loop , I've got a condition , and if that condtion is not met, I need to move on to the next iteration.

So if I have :
For Each txt As Control In tbcell.Controls
if TypeOf (txt) Is CheckBox Then

[code]....

View 3 Replies

Iteration Of Class Variables?

Sep 23, 2011

Background: I am working on an ASP.net project that basically fills out a form from user input. The generated form (for reasons which I have no control over) must be a JPEG or TIFF. So the user fills out the web form, which takes all of the input values and meges them into a blank image (jpeg) of the form. Using System.Drawing, it merges all of the text onto the form at designated Points. The points are defined as variables which are modified at runtime to compensate for the resolution of the image (in case it get modified/re-generated at a different dpi). All of this is working fine.

Problem: Currently I have a Sub that determines the dpi of the master image, then adjusts the Points accordingly. However, there are ~50 variables that have to be adjusted. So currently I have the Sub go thru each point variable and manually adjust the X & Y values. I have been working on a Sub that will iterate thru all of the Point variables and do adjustment. Here's a functional sample of what I have working:Imports System.Drawing

Partial Class test Inherits System.Web.UI.Page

[Code]...

This works...sort of. It allows me to grab each variable and modify it, but only in the instance. The original variable in the class is unchanged. Which means that when the program gets to the point where it's drawing text to the image, the points are unmodified. my basic question is: Is it possible to modify the original variable using this sort of process? If not, is the best way to use these modified values to declare the new class instance at a global level, then have the Sub that draws the text use the instance versions of the variables?

I realize that I could define all of the points in an array which would be easy to loop thru and update, but I've named each point variable something meaningful to correspond to the related text to be drawn.

View 1 Replies

.net - Unexpected IQueryable Value After ForEach Iteration?

Apr 15, 2012

I'm flummoxed I'm using VB.Net, Linq, and a DataContext. My DataContext contains a table 'transactions'.

I first declare an IQueryable(Of transaction) and assign it to nothing. I build a predicate in a foreach loop and use a transactions.Where(predicate) to assign the IQueryable a value. If I do an IQueryable.ToList(), I get a number of items in the collection.

However, on the next iteration of the loop, the IQueryable.ToList() gives me 0 items.This is driving me crazy. I tried to use the LINQ to SQL Debug Visualizer with VS2010, (I recompiled the 2008 version with the new reference) but no dice - I can't see the SQl generated or what's inside the IQueryable.

[Code]...

View 2 Replies

Asp.net - List Iteration Taking So Much Time?

Oct 13, 2010

I have List (of class). having 1800 of count and each object has 90 properties. When I terate earch with 90 properties taking more and more time. How to resolve this

Dim cellIntStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle
cellIntStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("#")
Dim cellDateStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle

[Code]....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved