Click here to Skip to main content
15,887,425 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to display the next month Pin
Blue_Boy30-May-09 1:40
Blue_Boy30-May-09 1:40 
GeneralRe: how to display the next month Pin
Mathew P V1-Jun-09 20:44
Mathew P V1-Jun-09 20:44 
AnswerRe: how to display the next month Pin
Baran M30-May-09 11:08
Baran M30-May-09 11:08 
Questionhow to select the calendar from another calendar when the date is being selected Pin
Mathew P V30-May-09 0:29
Mathew P V30-May-09 0:29 
AnswerRe: how to selct the control Pin
Blue_Boy30-May-09 0:42
Blue_Boy30-May-09 0:42 
GeneralRe: how to selct the control Pin
Mathew P V30-May-09 0:51
Mathew P V30-May-09 0:51 
GeneralRe: how to selct the control Pin
Blue_Boy30-May-09 0:55
Blue_Boy30-May-09 0:55 
Questionhow to expand particular node after button click..... Pin
bhuraasif30-May-09 0:04
bhuraasif30-May-09 0:04 
hi,

i have code as below to populate treeview. it works fine. and it populates as i want.

i have one button to edit treeview node text.that is also work fine.

the code to edit treeview node text as given last below.

i want that, when i edit treeview node text,after clicking button,the same treeview node expanded with new text of treeview.

how can i get this ??

Regards,
ASIF
Private Sub PopulateTree(Optional ByVal depth As Integer = 1)

'Populate the tree based on the subfolders of the specified VirtualImageRoot

Dim rootFolder As New DirectoryInfo(Server.MapPath(VirtualImageRoot))
Dim root As TreeNode = AddNodeAndDescendent("0", Nothing)

'Add the root to the TreeView

TvFile.Nodes.Add(root)



End Sub

Private Function AddNodeAndDescendent(ByVal val As String, ByVal parentNode As TreeNode) As TreeNode
Dim virtualFolderPath As String

ds = New DataSet()
If parentNode Is Nothing Then

virtualFolderPath = VirtualImageRoot

ds = ClsFileapp.GetRootFolder()

Else

ds = ClsFileapp.GetRootFolder(val)

virtualFolderPath = parentNode.Value & val & "/"

End If

Dim node As New TreeNode(ClsFileapp.GetfolderName(val), val)
node.ImageUrl = "images/folder.gif"

node.ToolTip = ClsFileapp.GetfolderName(val)

Dim reader As IDataReader = ds.CreateDataReader
While reader.Read()

Dim child As TreeNode = AddNodeAndDescendent(reader("id").ToString(), node)
child.SelectAction = TreeNodeSelectAction.Select

child.PopulateOnDemand = False

node.ChildNodes.Add(child)

End While

Return node
End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
imgDeleteFolder.Attributes("onClick") = "if (! confirm('are you sure to delete')) return false;"

If Not IsPostBack Then

PopulateTree()

TvFile.ExpandDepth = 1

PnlRename.Style("display") = "none"

ModalPopupExtender1.Hide()



End If

End sub



Protected Sub btnEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnFolderRename.Click
If Session("SubID") IsNot Nothing Then

If txtRenameFolder.Text <> "" Then

ClsFileapp.RenameFolderName(Session("SubID").ToString(), txtRenameFolder.Text)
Dim strpath As String = Session("PathValue").ToString()

Dim currentDepth As String() = strpath.Split("/")
TvFile.Nodes.Clear()

PopulateTree()

TvFile.FindNode(strpath).Selected = True

TvFile.FindNode(strpath).Expanded = True

TvFile.SelectedNodeStyle.BackColor = Drawing.Color.FromName("#829cb0")
TvFile.SelectedNodeStyle.ForeColor = Drawing.Color.White

Else

ModalPopUpRenameFolder()

lblRenameFolder.Visible = True

End If

End If

End Sub
QuestionShow webpage content as thumbnails Pin
sepel29-May-09 23:14
sepel29-May-09 23:14 
AnswerRe: Show webpage content as thumbnails Pin
Manas Bhardwaj29-May-09 23:22
professionalManas Bhardwaj29-May-09 23:22 
GeneralRe: Show webpage content as thumbnails Pin
sepel29-May-09 23:53
sepel29-May-09 23:53 
Questionon uploading i can't get multiple filepath at server side Pin
pujafaldu29-May-09 23:12
pujafaldu29-May-09 23:12 
Questionconnect sql 2005 database that is another sysem using asp.net Pin
azad yadav29-May-09 22:50
azad yadav29-May-09 22:50 
AnswerRe: connect sql 2005 database that is another sysem using asp.net Pin
specialdreamsin29-May-09 22:58
specialdreamsin29-May-09 22:58 
AnswerRe: connect sql 2005 database that is another sysem using asp.net Pin
Manas Bhardwaj29-May-09 23:23
professionalManas Bhardwaj29-May-09 23:23 
AnswerRe: connect sql 2005 database that is another sysem using asp.net Pin
Mathew P V30-May-09 0:35
Mathew P V30-May-09 0:35 
AnswerRe: connect sql 2005 database that is another sysem using asp.net Pin
K03063-Jun-09 20:46
K03063-Jun-09 20:46 
QuestionAspnet_regsql.exe and generating scripts Pin
NetQuestions29-May-09 22:35
NetQuestions29-May-09 22:35 
QuestionWhy I call flash or video always failed [modified] Pin
jason_mf29-May-09 21:43
jason_mf29-May-09 21:43 
AnswerRe: Why I call flash or video always failed Pin
Manas Bhardwaj29-May-09 23:24
professionalManas Bhardwaj29-May-09 23:24 
GeneralRe: Why I call flash or video always failed Pin
jason_mf30-May-09 0:00
jason_mf30-May-09 0:00 
QuestionN-TIER APPLICATION Pin
Rolando Y. Puno29-May-09 20:47
Rolando Y. Puno29-May-09 20:47 
AnswerRe: N-TIER APPLICATION Pin
A k ch29-May-09 21:19
A k ch29-May-09 21:19 
AnswerRe: N-TIER APPLICATION Pin
Colin Angus Mackay29-May-09 22:39
Colin Angus Mackay29-May-09 22:39 
AnswerRe: N-TIER APPLICATION Pin
Baran M29-May-09 23:50
Baran M29-May-09 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.