Click here to Skip to main content
15,929,263 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: By using asp panel Pin
l0kke26-Jul-06 4:02
l0kke26-Jul-06 4:02 
QuestionDataRepeater & Datagrid Interesting Problem Pin
Trehan24-Jul-06 18:03
Trehan24-Jul-06 18:03 
AnswerRe: DataRepeater & Datagrid Interesting Problem Pin
Ista27-Jul-06 7:10
Ista27-Jul-06 7:10 
GeneralRe: DataRepeater & Datagrid Interesting Problem Pin
Trehan27-Jul-06 19:09
Trehan27-Jul-06 19:09 
GeneralRe: DataRepeater & Datagrid Interesting Problem Pin
Ista28-Jul-06 2:47
Ista28-Jul-06 2:47 
QuestionHow to find a file Pin
mahammadhusen24-Jul-06 17:46
mahammadhusen24-Jul-06 17:46 
AnswerRe: How to find a file Pin
nisha261224-Jul-06 18:14
nisha261224-Jul-06 18:14 
QuestionTreeview doesn't update after treenode.remove [modified] Pin
neutronron24-Jul-06 12:40
neutronron24-Jul-06 12:40 
I've written the following code to remove a node from a treeview on a postback. The node and underlying data are removed, by the node is still there. Apparently I need to force a refresh, as the selected node does go away when I navigate away and back to the page. I have a similar sub that expands or collapses the tree without any problems so this behavior doesn't seem consistent.

Can anyone help?

Thanks
Ron


  106     Protected Sub Button_DeleteFeeds_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_DeleteFeeds.Click


  107         'Remove selected feeds from the RSS feed list


  108         Dim node As TreeNode


  109         Dim nodes As TreeNodeCollection = TreeView_PersonalFeeds.CheckedNodes


  110         Dim promptText As StringBuilder


  111 


  112         promptText = New StringBuilder("Delete the following feeds?")


  113 


  114         If nodes.Count > 0 Then


  115             For Each node In nodes


  116                 promptText.AppendLine()


  117                 promptText.Append(node.Text)


  118             Next


  119             Dim result As Integer = MsgBox(promptText.ToString, MsgBoxStyle.OkCancel, "Delete Action")


  120             If result = MsgBoxResult.Ok Then


  121                 For Each node In nodes


  122                     DeleteNode(node)


  123                 Next


  124             End If


  125            


  126 


  127         End If


  128 


  129     End Sub


  130 


  131     Protected Sub DeleteNode(ByVal node As TreeNode)


  132         If node.ChildNodes.Count = 0 AndAlso node.Text <> "" Then


  133             'node is a leaf node (feed item)


  134             personalFeedItemsAdapter.Delete(New System.Guid(node.Value))


  135 


  136         Else


  137             'node is a folder or feed node


  138             If Not String.IsNullOrEmpty(node.Text) Then


  139                 'node must reference a feed (guid string has been stored in text field)


  140                 'remove the feed from the db


  141                 personalFeedsAdapter.Delete(New System.Guid(node.Value))


  142             End If


  143             For Each child As TreeNode In node.ChildNodes


  144                 'recursively remove child nodes


  145                 DeleteNode(child)


  146             Next


  147         End If


  148         'remove the node from the tree


  149         TreeView_PersonalFeeds.Nodes.Remove(node)


  150     End Sub








-- modified at 18:44 Monday 24th July, 2006
AnswerRe: Treeview doesn't update after treenode.remove Pin
minhpc_bk24-Jul-06 15:55
minhpc_bk24-Jul-06 15:55 
QuestionImage in ASP.Net gird Pin
mynameatif24-Jul-06 7:43
mynameatif24-Jul-06 7:43 
AnswerRe: Image in ASP.Net gird [modified] Pin
Sebastien Lachance24-Jul-06 8:52
Sebastien Lachance24-Jul-06 8:52 
AnswerRe: Image in ASP.Net gird Pin
Cybertrace24-Jul-06 9:23
Cybertrace24-Jul-06 9:23 
GeneralRe: Image in ASP.Net gird Pin
Not Active24-Jul-06 10:19
mentorNot Active24-Jul-06 10:19 
QuestionBrowser vs. Server validation, how is this accomplished? Pin
Skanless24-Jul-06 7:33
Skanless24-Jul-06 7:33 
AnswerRe: Browser vs. Server validation, how is this accomplished? Pin
Not Active24-Jul-06 7:41
mentorNot Active24-Jul-06 7:41 
QuestionAutomation using webbrowser in c# 2005 Pin
Green Fuze24-Jul-06 6:42
Green Fuze24-Jul-06 6:42 
AnswerRe: Automation using webbrowser in c# 2005 Pin
RichardGrimmer24-Jul-06 7:00
RichardGrimmer24-Jul-06 7:00 
GeneralRe: Automation using webbrowser in c# 2005 Pin
Green Fuze24-Jul-06 10:12
Green Fuze24-Jul-06 10:12 
GeneralRe: Automation using webbrowser in c# 2005 Pin
RichardGrimmer25-Jul-06 6:02
RichardGrimmer25-Jul-06 6:02 
QuestionCaching, why not use the asp.net cache for everything? Pin
Member 9624-Jul-06 6:28
Member 9624-Jul-06 6:28 
AnswerRe: Caching, why not use the asp.net cache for everything? Pin
Not Active24-Jul-06 7:17
mentorNot Active24-Jul-06 7:17 
GeneralRe: Caching, why not use the asp.net cache for everything? Pin
Member 9624-Jul-06 8:20
Member 9624-Jul-06 8:20 
GeneralRe: Caching, why not use the asp.net cache for everything? Pin
eggsovereasy24-Jul-06 8:31
eggsovereasy24-Jul-06 8:31 
GeneralRe: Caching, why not use the asp.net cache for everything? Pin
Member 9624-Jul-06 8:35
Member 9624-Jul-06 8:35 
QuestionAcess global variable in crystal reports. Pin
ImranIBM24-Jul-06 6:20
ImranIBM24-Jul-06 6:20 

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.