|
Don't cross post it doesn't get you an answer any faster, it just gets you ignored.
only two letters away from being an asset
|
|
|
|
|
sorry, i'm new, i wasn't sure where to put the message, i'll take this one off
|
|
|
|
|
The very first message "How to get an answer to your question" is where you should begin.
only two letters away from being an asset
|
|
|
|
|
|
Hey all,
I've recently jumped onto ASP.NET (normally code in PHP). I'm doing the C# flavour, if that makes much difference.
I have created a class like this:
public class TreeNode2 : TreeNode
{
private string _dbuid;
public string DbType
{
get { return _dbtype; }
set { _dbtype = value; }
}
public TreeNode2(string text, string value, string dbuid, string dbtype)
{
this.Text = text;
this.Value = value;
this._dbuid = dbuid;
this._dbtype = dbtype;
}
}
Which has been placed inside the "App_Code" folder. Now on my ASPX page, I have this:
<asp:TreeView ID="TreeView1" runat="server" ShowLines="True" OnTreeNodePopulate="PopulateNode">
<Nodes>
<asp:TreeNode Expanded="True" Text="Users" Value="Users">
<asp:TreeNode PopulateOnDemand="True" Text="John" Value="John" Expanded="False"></asp:TreeNode>
<asp:TreeNode PopulateOnDemand="True" Text="Mary" Value="Mary" Expanded="False"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
Now, inside the "PopulateNode" function, I can use TreeNode2, no problem. But how would I go about replacing "<asp:TreeNode..." with "<asp:TreeNode2..." ?
If you need me to explain anything a bit better, please let me know.
Regards,
CD
|
|
|
|
|
Create you own TreeView control. Seriously. Do a quick lookup of server controls like TreeView and how child elements are created.
only two letters away from being an asset
|
|
|
|
|
I had a look around, and I found some source code for all these different AJAX TreeView Controls, but I didn't manage to find any information for what I want to do. Would it be worth me taking some time, picking apart one of the AJAX TreeView controls to find out how to do what I want, or is that just a regular TreeView with AJAX functionality?
I don't really want a whole new TreeView, I only want to be able to bind additional information to each TreeNode, and later on, try add some AJAX functionality.
|
|
|
|
|
AJAX has nothing to do with it, it is client-side, TreeView is a server control.
If all you want is a little extra info, like an id, then use the value property of the TreeNode
only two letters away from being an asset
|
|
|
|
|
I need to add two bits of information, but I suppose I could concatenate that into the value field, thanks for the tip.
As for the AJAX, I'm aware that it's client, and not server, I was just unsure if the examples I found on the web would just modify the existing control to run on AJAX, or if they made a brand new control, which also made use of AJAX.
At any rate, I think I can solve this one with the Value field, and move from there.
Thanks for the quick and friendly replies.
Regards,
CD
|
|
|
|
|
Hi,
I am facing a problem with grid header. I have a screen with multiple grids in it. The screen is too huge, so I have a a scrollbar in the screen. I also have a vertical scrollbar in each grid too.
The problem is that, when I make grid header's position: relative, grid header gets fixed when I scroll using grid's scrollbar, which is good. But when I scroll using screen's scrollbar, the everything moves except the grid's header.
If I make position:absolute, and scroll using screen's scrollbar, the header also scrolls, but when I scoll using grid scrollbar, the header also moves along with the grid's row.
Please help me fix this issue.
Thanks in advance!!!!
modified on Friday, February 15, 2008 4:55 PM
|
|
|
|
|
Hi everyone,
I'm displaying a large amount of text in a label and the whole page gets out of shape when I do that. Can anyone give me an idea of how to make the text wrapable in a Label control.
Thanks
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: Label control
That would render as a SPAN right?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
offcourse!!
So that mean I need to put in BR's at the right places. RIGHT
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Yup. HTML can not understand just NewLines and CRLFs, unless it is within a PRE tag. You ought to inject enough BR tags to force line breaks.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
|
Use CSS styles is the proper way for this, forget all the br tags nonsense, it isn't extensible or supportable.
only two letters away from being an asset
|
|
|
|
|
actually Im a bit weak with CSS at the moment. But I was wondering how CSS Styling can make text wrapping possible. bcz its simply a straight long text how will the browser know where it needs to put a br?
Can u plz elaborate on that
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
If you put you label in a table cell, for example and constrain the width of the table, then the text will wrap on it's own. It's not so complicated. Unless, of course, you don't have any spaces, in which case, then good luck.
|
|
|
|
|
Tables are unnecessary just to format and display text. They are slower to render and very much overkill for this purpose.
only two letters away from being an asset
|
|
|
|
|
Yes, but they make for a nice simple example on a Friday afternoon, for someone that's obviously having quite a bit of trouble with a simple concept...
|
|
|
|
|
as opposed to showing correct methods that are more supportable and extensible, you show what is most expedient.
Didn't get the impression that the OP was "having quite a bit of trouble with a simple concept"
only two letters away from being an asset
|
|
|
|
|
Friday afternoon is just a great time for expedience... )
|
|
|
|
|
yea that worked. Thanks a lot everyone esp yo u Paddy. Cheers...
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
|
i want to use store procedure in database for my web application,but i don't know anything about it.plz it's urgent i want code how to write store procedure and how to call it in code side portion?
|
|
|
|