|
how to disable/enable treeview nodes in asp.net c#
|
|
|
|
|
ravishankarreddy27 wrote: how to disable/enable treeview nodes in asp.net c#
With code.
A good start would be taking this question, and the one you posted below, to the correct forum[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: A good start would be taking this question
What about going to a book store and buying a book?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I don't frequent the ASP.NET forum, so taking questions like this over there would be a good start. That way I wouldn't have to look at it.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
ravishankarreddy27 wrote: how to disable/enable treeview nodes in asp.net c#
There is no property to enable or diable a node in treeview.
Here, you can change style of the node to look like a disabled(or ateast different).
You may need to handle a bit more if you have urls defined in the NavigateUrl property or have a click event fired.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i have add the ajaxcontroltoolkit dll(1.0.10301.0 version)
when i drag the tabcontrol to the page and add 3 gridviews in 3 tabs
then in runtime the gridview shows below the tab control
|
|
|
|
|
ravishankarreddy27 wrote: have add the ajaxcontroltoolkit dll(1.0.10301.0 version)
when i drag the tabcontrol to the page and add 3 gridviews in 3 tabs
then in runtime the gridview shows below the tab control
Post it in ASP.NET Forum!
|
|
|
|
|
I had a small BHO application, I had make a setup through Setup and deployment Project.
I got the setup in debug folder. If I right click and check the properties of that setup, In that click Version tab, the option FILE VERSION is showing some value like 8.0.50727.42 (RTM.050727-4200), I want change this value, How to change this? I was using vs2005.
|
|
|
|
|
svt gdwl wrote: I want change this value, How to change this?
Change the version from the properties dialog in VS 2005
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hey all,
I have the following problem:
I want to add some functonallity to my application that searches your entire harddisk and lists all the files that have been found.
Now i have the following code, but when i want to look in certain folders i get an access denied error. Is there a way to get some tep. read rights for that folder?
private void bgwInit_DoWork(object sender, DoWorkEventArgs e)
{
Files = 0;
Size = 0;
string dir = (string)e.Argument;
List<ListViewItem> results = new List<ListViewItem>();
string[] DirectoryArray = System.IO.Directory.GetDirectories("C:\\Windows");
DateTime lastReport = DateTime.Now;
if (DirectoryArray.Length != 0)
{
foreach (string D in DirectoryArray)
{
System.IO.DirectoryInfo WDDirInfo = new System.IO.DirectoryInfo(D);
try
{
System.IO.FileInfo[] WDFileInfo = WDDirInfo.GetFiles("*.*", System.IO.SearchOption.AllDirectories);
foreach (System.IO.FileInfo FI in WDFileInfo)
{
ListViewItem itmLog = new ListViewItem();
itmLog.Text = FI.FullName.ToString();
itmLog.UseItemStyleForSubItems = true;
itmLog.SubItems.Add("Veilig");
itmLog.ForeColor = Color.Green;
itmLog.EnsureVisible();
results.Add(itmLog);
string path = FI.FullName.Remove(0, 3);
Files = (Files + 1);
Size = (Size + FI.Length);
}
}
catch (Exception ex)
{
}
if ((DateTime.Now - lastReport).TotalMilliseconds >= 25 || results.Count > 30)
{
this.bgwInit.ReportProgress(0, results);
results = new List<ListViewItem>();
lastReport = DateTime.Now;
}
}
}
try
{
System.IO.DirectoryInfo WDRootDir = new System.IO.DirectoryInfo("C:\\Windows");
System.IO.FileInfo[] WDRootFileInfo = WDRootDir.GetFiles("*.*", System.IO.SearchOption.TopDirectoryOnly);
foreach (System.IO.FileInfo FI in WDRootFileInfo)
{
ListViewItem itmLog = new ListViewItem();
itmLog.Text = FI.FullName.ToString();
itmLog.UseItemStyleForSubItems = true;
itmLog.SubItems.Add("Veilig");
itmLog.ForeColor = Color.Green;
itmLog.EnsureVisible();
results.Add(itmLog);
string path = FI.FullName.Remove(0, 3);
Files = (Files + 1);
Size = (Size + FI.Length);
}
}
catch (Exception ex)
{
}
if ((DateTime.Now - lastReport).TotalMilliseconds >= 25 || results.Count > 30)
{
this.bgwInit.ReportProgress(0, results);
results = new List<ListViewItem>();
lastReport = DateTime.Now;
}
this.bgwInit.ReportProgress(50, results);
}
private void bgwInit_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
List<ListViewItem> items = e.UserState as List<ListViewItem>;
this.lstFiles.BeginUpdate();
foreach (ListViewItem item in items)
{
this.lstFiles.Items.Add(item);
}
this.lblFilesScanned.Text = this.lstFiles.Items.Count.ToString();
this.lstFiles.EndUpdate();
}
|
|
|
|
|
mkoopman wrote: that searches your entire harddisk and lists all the files
What a freakin horrible thing to do. yuk - You are going to need elevated permissions to see some folders. There are hidden and system folders that are not generally available to your app!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I figured that out, but do you know a way (if it is there) to do this?
|
|
|
|
|
There is a good reason that these folders are kept secure. Can I suggest you look at a different approach.
What is the reason for indexing the files? Beyond a googlesque search app I cannot see a reason.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
The reason for me wanting this, is because im writing an application that checks your filesystem for harmfull files.
And if i cant access certain folders, it does not work as it should work
|
|
|
|
|
mkoopman wrote: Is there a way to get some tep. read rights for that folder?
No, there isn't. Either you already have the permissions to see inside those folders, or you don't. It's that simple. There is no such thing as getting "temporary read permissions" to anything.
|
|
|
|
|
So there is no way of reading out those dirs?
|
|
|
|
|
Sure there is: having the permission already.
And that's easy.
|
|
|
|
|
Okey, how should i do that?
|
|
|
|
|
Tell the user to log in as admin and not to use Vista and you'll be fine
Of course that isn't a real solution..
You could abandon C# (partially) and have at least part of the program run as driver
|
|
|
|
|
No, there isn't.
You cannot grant yourself more permissions that you already have.
|
|
|
|
|
If it's a permissions issue then you can use impersonation[^] to impersonate a user that does have the required permissions. More info here[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I am trying to create a round button which spins a spot around the inside at radius-10mm form edge.
Representing where the mouse has moved (A volume Knob on cd player etc).
I have found the center of the circle and the point at which the mouse was clicked.
I know need to draw a spot along the in the position (radius-10) along the line form the center to the mouse position.
Does anyone have an idea as to how i can plot the spot in the correct poistion.
thanx
|
|
|
|
|
Whats wrong with mouse move event in the container of the button? You may need to handle the event for a number of containers/controls but you have half the problem and now have the other half.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi i created dropdown(categories) , checkbox Listview, according to category it will display in listview . after selecting items he wiil close the form then he went to parent form . In parent form before saving record , once again if he opens checklist form , then there should be previous selected items ........ is it good idea to store items in Arraylist . if possible give me some idea
thanks
|
|
|
|
|
Member 4587679 wrote: is it good idea to store items in Arraylist
No.
Use a generic List instead. Don't post back asking what a generic List is, Look it up.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|