|
This link has several solutions: http://forums.asp.net/thread/469254.aspx
The best one I found was offered by persky. To use it, backup the treeview.htc file and then open it with notepad or some other text editor. Find the function "nodePlusMinusClick" and replace the entire function with the following code:
function nodePlusMinusClick()
{
if (g_bInteractive == false)
return;
var el = this.parentElement.treenode;
// 2 lines below commented out to disable postback on expand/collapse, extra lines added below for better functionality
// if (doNodePlusMinusClick(el) == true)
// fireQueuedEvents();
var index = getNodeIndex(el);
// if the selected or hovered node was one of the collapsed node's descendants then postback anyway
if (selectedNodeIndex.length > index.length && selectedNodeIndex.substr(0,index.length) == index)
{
if (doNodePlusMinusClick(el) == true)
fireQueuedEvents();
}
// otherwise just do the expand/collapse stuff
else
doNodePlusMinusClick(el);
}
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
there is another solution as well.
When you are adding the nodes do this
You can disable postbacks for expand/collapse events by Setting the property TreeNode.SelectAction = TreeNodeSelectAction.Expand. This will cause the treenodes to expand/collapse without a postback. If you want to enable postback for a particular node, set the property TreeNode.SelectAction = TreeNodeSelectAction.Select or TreeNodeSelectAction.SelectExpand.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hi Kuricheti,
There is no AutoPostBack event in Treeview control. To get the selected text you can use OnSelectedNodeChanged property in .aspx file and point it to some function.
eg. <asp:treeview id="tvCategories" runat="server" enabletheming="true">
OnSelectedNodeChanged="SelectCategory">
to get the selected value write a function in C# and use TREEVIEWID.SelectedNode.Text
eg. tbCategory.Text = tvCategories.SelectedNode.Text;
Try it out.
|
|
|
|
|
Hi All
Create New Email in Domain Dynamaically using asp.net
Please If any know regarding this reply me
Thx
|
|
|
|
|
Here[^].
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I am using formview control in my web apllication . i am using sqldatasource for binding data . its giving edit , new , delete . but i dont want only delete . how to remove only delete from that formview cotrol .
|
|
|
|
|
As I recall, binding a formview to an sqlDataSource causes auto-generation of the FormView html code. All you need to do is find the delete button(s) and remove them, or set their Visible propery to false.
|
|
|
|
|
Can we capture the events like click of ASP.NET2.0 controls like link button at client side.
For example, there is a link button which performs some operations say download,when the checkbox of the GridView are checked.
But what if when the checkboxes are not checked and the link button is clicked, it will uselessly sends request to server and opens download box with no records.
Is there any way to capture this event at client side so that if the checkboxes are not checked alert soem message like "plz select record", and if call link button event only when atleast one checkbox is checked
Thanks in advance,
|
|
|
|
|
Validators will do this for you. And, you can capture anything you like, just put the client side event handlers in the controls that are generated and write processing javascript. Some control have an onclientsideclick event in ASP.NET, you can return false and they won't click through.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes, link button has onclient click event......
some you plz explain me in more detail, i mean how can i handle the checkbox selection
from gridview?
means only the download link button work when atleast one checkbox in gridview is checked...
oterhwise say "select record"
|
|
|
|
|
You need the client ids of all your checkboxes, then you can write javascript to iterate over them and see if any is checked. So, you need to write the client ids as javascript variables in your code behind.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello to all.
i m using asp.net2.0.I want to read word file and move its content to textbox..
thanx
yogesh
|
|
|
|
|
yogeshpan wrote: i m using asp.net2.0.I want to read word file and move its content to textbox..
And what is the problem?
Apurva Kaushal
|
|
|
|
|
just as streamreader used to read txt file i want to read a document in .doc format
yogesh
|
|
|
|
|
Check this[^] out.
Apurva Kaushal
|
|
|
|
|
Try here[^]
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hehehehehehe
It seems that your new article will be the most frequently used reply
M. Gouda
foreach(Minute m in MyLife)
{
myExperience++;
}
|
|
|
|
|
I'm afraid so
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
you should use js to read .doc file and then show in textbox...
|
|
|
|
|
Hi all! as we know if we creates an UserControl thenwe can get HttpRequest object using this.Request property. now which interface should i implement for creating a custom control in order to getting HttpRequest object in custom control?
|
|
|
|
|
I need to subclass an extender control and put it inside a UserControl.
But the target control will be on the webpage.
However when I assign the TargetControlID="TextBox1" I get the following error:
Server Error in '/SampleWebSite' Application.<br />
-------------------------------------------<br />
The TargetControlID of 'MyExtender' is not valid. A control with ID 'TextBox1' could not be found.<br /> Here, "MyExtender" is the UserControl which has the extender control inside it. The "TextBox1" is on the webpage where this UserControl is used.
Obviously it is looking for the TextBox1 inside the UserControl itself. How can I make it search on the entire webpage instead?
What is the way to properly assign the TargetControlID in such a case?
Thanks,
modified on Thursday, March 13, 2008 7:11 AM
|
|
|
|
|
hiii
how to find the provider in the connection string that is used while connectiong to oracle databse in asp.net application
thank you
|
|
|
|
|
Why do you want to know the provider, shouldn't you have set it? or am I mis undertstanding
|
|
|
|
|
If you searching for provider name that is to be given in Connection string its System.Data.OracleClient
|
|
|
|
|
iam using a custom validator to a textbox checking for first character should not be numberic .when iam clicking button for the first time after entering numerics in the text box the error message is not firing .its is firing for the second time not to allow numerics for the first time .how can i solve this problem.
|
|
|
|