Expand And Collapse Listview Group?
Dec 13, 2009I add expanders and collpase in Listview groupadil
View 2 RepliesI add expanders and collpase in Listview groupadil
View 2 RepliesI am using VB.NET 2008. I am using propertygrid and have added a few elements. I have 3-4 categories and wanted to know how can I expand/collapse a particular category thru code. I did find a code on net but it didn't work.
View 10 RepliesI was searching for a solution to collapse/expand text like you do in the VS-IDE. I want to have that in a TextBox (multiline) or in a RichTextBox.
View 2 RepliesWhen I comment out a particular Sub in my program the expand/collapse icon (+/-) disappears? I want to comment out a subroutine in my program & collapse it down to one line, but the +/- goes away when I do. It only happens on that one sub. When I comment out any other sub the "-" is there so I can collapse it.
View 5 RepliesI'm overiding the node draw event for a treeview in draw all mode such as the code below.
Protected Overrides Sub OnDrawNode(ByVal e As System.Windows.Forms.DrawTreeNodeEventArgs)
Try
[Code]....
Clearing the graphics object on draw before drawing node Setting background rectangle and drawing the node just like when selected
May I know how can I collapse panel or group box in a windows form? I just want to put my datagridview in the panel or group box and collapse the panel..
View 2 RepliesI need to create a solution in which I populate some rows with data from a database.In those rows I put usernames and total values (total resulted from products selled in one month by every user)The idea is that I need to make somehow that when I click on one user (event CellContentClick on DGV) to expand the user in the way that I can see all products selled by that user in the selected month.I readed on the internet that I have to use datagridview inside the datagridview.I was thinking maybe I can have some expandable rows inside the datagridview (like in Excel) and when I click on + sign to expand the rows and to populate with selled products.
View 4 RepliesI have a problems with my application..
1. collapse and expand treeview when i click plus sign (+) on treeview, treeview didn't expand subfolder but when i click image, treeview expand it.
2. showing path that i check on treeview when i check the treeview then i'm click the button, then return path that i check
This is my code..
When I select a node in my treeview I have no problem seeing them in my web browser.
My problem is that when I try to collapse my tree then my last viewed document in the web browser remains visibe.
How can I ensure that when I collapse my tree my web browser will also become totallt empty?
I want to remove a group (include all items in this group) in ListView, but unsuccessful, the code is below, why?
ListView1.Groups("GroupName").Items.Clear()
ListView1.Groups.Remove(ListView1.Groups("GroupName"))
I have a picturebox that I am importing an image to. I need it to expand but not expand past my buttons at the bottom of the screen. When I import the image it takes up the whole screen and covers up my buttons.
View 9 RepliesI have a problem with ListView Group Tasks in Visual Basic.net. I've created a derived class from ListView wich have collapsible groups, and other features not included in common listviews. I use the LVN_LINKCLICK to catch the Task clic event, but when
View 1 Repliesi have a list view with items that a user adds and what i want to do is run a query from my database that checks if the items in the list view are active and if they are move them to a group on the list
EG
Test = active
NoTest = Inactive
Group Online
[Code].....
i have 2 groups Online and offline i want to check if the user is online and if so move them to the online group
i have the query and that to check it i just dont know how to move the users to the correct group
I have a listview in which the View is set to Details. I have a module with a Sub that accepts a Listview and a sql query as arguments:
Public Sub PopulateListView(ByVal lvw As ListView, ByVal filtersql As String)
Dim li As New ListViewItem
Dim lvwColumn As ColumnHeader
Dim counter As Integer
[Code] .....
This is how I call the sub:
PopulateListView(lvwTranHistory, "SELECT AccountID,TransactionDate,TransactionAmt FROM [Transactions] WHERE GameSheetID = " & CurGameSheetID & ";")
I tried some stuff there to group by the accountid but it ain't working. How to get the grouping to work.
I'm trying to drag an item between two Groups in the same ListView called 'listTasks'.
Private Sub listTasks_ItemDrag(ByVal sender As Object, ByVal e As ItemDragEventArgs) Handles listTasks.ItemDrag
listTasks.DoDragDrop(listTasks.SelectedItems, DragDropEffects.Move)
End Sub
Private Sub listTasks_DragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles listTasks.DragEnter
[Code]...
With listTasks.PointToClient(New Point(e.X, e.Y)) you could use listTasks.GetItemAt(p.X, p.Y) to get the ListView item you're over. Is there something like this for Groups? Or perhaps a better way to determine what group is the target of a drag-drop?
I want to show the group name font in listview as bold, can i do that?
View 1 RepliesI want to change the color of the group header text in listview which separates all the items into various groups, there is no such option to do that directly because no such property exists.
[Code]...
also i have a table called Orders with several columns, they contain information about the order and store the ID of the Customer they belong to.Question is: how can i query that table with (preferably) linq (the datacontext is from LinqToSql) to return the following dataI want to search for any entry with the matching CustomerID which took place, group them by Year, Sum the Totals respectively and add them to the listview?I now i could use lamda expressions and aggregate, its just not clear how (option infer on,db is a datacontext object,CustomerID is an int32 variable):
Dim Orders = (From order In db.Orders Where order.CustomerID = CustomerID).GroupBy(Function(p) p.Date.Year).GetEnumerator
I reckon i'd have to create an anonymous type like the following:
[code].....
I'm developing Asset Management System, it will compute for straight line depreciation, my problem is how to calculate running total on each group that I've extracted from my database.Here's a snippet for my extraction of data
Private Sub cboAType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboAType.SelectedIndexChanged
ListView1.Items.Clear()
If Not cboAType.Text = "-" Then
[code]....
I want to change the color of the group header text in listview which separates all the items into various groups, there is no such option to do that directly because no such property exists.
As far as i can think of it can be achieved via overriding the paint event but i have not done any overriding of paint events on windows controls so far.
I am trying to populate a a listview control with items and subitems that a user enters into a group of textboxes on a form. It looks as if some of the code to do this has changed since VB6 and I am confused again. Here is the current code I am using without success:
lvSurgProcedure is the name of my listview control
Private Sub btnAddSurgeProcedure(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddSurgProcedure.Click
Dim lvItem As New ListViewItem
[code].....
I'm trying to match up a specific group name and see if it exists for the currently logged in user using Active Directory roles. If the Group Name exists for the Current User, I want that group name to be displayed in a drop down list. Example: If current user is in BIG Group, display BIG in drop down list.Problem: All I am getting is SIDs and I'm not able to get anything to match up to the group name and nothing will show up in the drop down list.I also get the following Error:Error: Object variable or WIth block variable not set.How do I fix this?? here is the code I am using:
Private Sub GetMarketingCompanies()
' code to populate marketing company drop down list based on the current logged in users active directory group that
[code].....
Enumerate if an Active Directory group's member is user or another group
View 1 RepliesThe situation is that I have a menu strip on the form from which the user can select an item, which opens a sub-menu, which opens another sub-menu which contains a combo box listing some options.
Eg. File>Project>Load>combo-box control
When the item is selected in the combo box, the code executes and modifies values on the same form, but the menu system does not collapse by itself.
I have to click on the form and then the menu system collapses.
I tried setting the focus to the form, but that does not collapse the menu system.
Does anyone know how to get the menus to collapse automatically?
I am writing an application and I do not know how to reference a group of controls inside a group box. I will include the code I have written so far and a picture with a detailed explanation as to what I am trying to do. Feel free to comment on any discrepancies that you may notice in my code.
Code:
Public Class Form1
' The following class-level constants are used
' to calculate the price of the model
Const decCOUPE As Decimal = 18000
[code].....
anyone have some quick code on how to do this?
wmi is not a option.
I've bee working on a project for quite some time now, and I get tired of scrolling all the way to where I am going to implement new code. I use #Region a lot, but this does not help me within methods, so what I'm wondering is, is there any way to collapse text within methods, or do I have to keep scrolling?
View 8 RepliesI have a block of related sub routines I would like to "group" together within class to make navigating a littel easier. When I say group, I mean achieve the same functionality of being able collapse and expand a block of code as would with single procedure or class. Two alternative ways I can think to accomplish this is either use a partial class for those procedures or use namespace. I just wanted to see if VS for VB.Net had another way to be able group and collapse blocks of procedures.
View 3 Replieshow to collapse a part of code in vb.net?
View 4 RepliesI know i can collapse all regions with Ctrl+M, Ctrl+O - but that also collapses all of the subs/functions/properties etc within the #Region.if it collapsed all of the sub regions too - just not the subs etc.Is there a way to collapse all top level regions only? Maybe an extension?
View 1 Replies