|
|
Comments and Discussions
|
|
 |

|
Hi,
I'm using the TreeListView to display data, but the data is refreshed by an updating interval. So always when data is refreshed, the treeListView is completley collapsed.
I tried with this, but it doesn't work:
var expanded = treeListView1.ExpandedObjects;
treeListView1.SetObjects(data);
foreach (var exp in expanded)
{
treeListView1.Expand(exp);
}
How can i do this ?
Thanks in advance,
Mondkind93
|
|
|
|

|
Hi,
i have a ObjectListView control with many more columns, about 20.
The db query is very fast, but when i set data using SetObjects ( this.objectListView1.SetObjects((List)result, true); ), to see the data in the control i have to wait about a minute.
Anybody can help me ?
Thanks in advance.
Giuseppe.
|
|
|
|

|
Hi,
i need to reposition the selection over the current selected row after reloading or sorting the grid items.
I tried with SelectedObject without fortune.
How can i do this ?
Thanks in advance,
Giuseppe.
|
|
|
|

|
For all those out there using ObjectListView for the first time, I strongly recommend reading the section entitled Unlearn You Must on the official OLV page.
The most important points here are:
1) OLV is not a drop-in replacement for a regular .NET ListView
2) Do not use the regular ListView properties and methods. Use the OLV equivalents and extras instead.
3) Do not use ListViewItems. Generally, you will not need to change anything in the list directly. OLV uses a model-centric approach, which means it will handle most of the view state internally.
FYI
|
|
|
|

|
Hi,
I'm using following statement to retrieve a value from a cell(datalistview):
this.dlvData.Items[this.dlvData.SelectedIndex].SubItems[1].Text;
This works perfectly but I would like to call the cell value by key, like this:
this.dlvData.Items[this.dlvData.SelectedIndex].SubItems["olvColumn01"].Text;
This gives null, any idea how to call the cell value by key/name instead of using the index.
Thanks in advance for the support.
Benjamin
|
|
|
|

|
I have been chasing a bug for several days that gives me; "...is not a parameter-less method, property.." as text in my subitem. I thought this was a C# error but found nothing on Google, so searching for the text found it in OLV Munger.cs. It seems that on a certain OLV column that if I use an AspectName I get this error instead of the text that should be in that field. If I remove the AspectName then I just get a blank field, instead of my data. There does not seem to be anything unique about the column, but it will not show the data (that is confirmed to pass into OLV), where all the other columns work as designed.
Anyone got any suggestions?
Thanks
modified 24 Apr '13 - 7:29.
|
|
|
|

|
Hi, I have a graphical bug with OLV.
I use several image in a OLV. All of this images have the same size, but some images are resized and some images not.
In this screen capture, the TV logo and the HDTV logo are the same size but the HDTV logo is resized and become very blurry !
http://img694.imageshack.us/img694/917/guidedelutilisateurmozi.png[^]
I don't know if it's a OLV bug, Windows bug or .NET bug. If someone can help me...
|
|
|
|

|
I have use this control for times, and when I update the dll from 2.4.0 to 2.5.1, it looks some stranges:
If you use TreeListView, and set like these:
treeListView1.CheckBoxes = true;
OLVColumn col = new OLVColumn();
col.TextAlign = HorizontalAlignment.Right;
treeListView1.Columns.Add(col);
In 2.4.0, whatever you set the TextAlign property, the check box stay on the left,then icon and text.
In 2.5.1, the check box will stay on the right, but both the icon and text still on the left.
modified 28 Mar '13 - 13:02.
|
|
|
|

|
Let me start by thanking you for this wonderful control and second by appreciating you for your patience on some harsh comments. I want to filter the filtered results. For example after searching "x" from list I got 13 results. And from these 13 results, I want to filter "s". Any trick or help.
I wonder if there is any adjustment for Text Highlighter for RightToLeft languages. Because while highlighting text for right to left languages, control start highlighting text from left side of text. For example one wants to search for "ار" from a word "اردو", control should highlight "ار", but instead of "ار" it highlights "دو".
modified 26 Mar '13 - 15:04.
|
|
|
|

|
Hello.
First of all congratulate you on the great control that has placed at our disposal, is exceptionally good.
Second, how can edit the value of a cell from the code, ie, without user intervention?, In my case I have to go through the list and according to the value of a cell to change the value of another.
Thanks in advance
pd. Sorry for my English, isn´t very good
|
|
|
|

|
Very interesting and practically important stuff.
Thank you for sharing.
—SA
|
|
|
|

|
5
(I'd give you 6 if they had it)
Great work!
|
|
|
|

|
Hello,
First, I want to congratulate you (again) for this wonderful component. Been using it for over 3 years now.
I encountered an issue. I want to change the background color of items programatically (not in the format row event).
For example, I want when I click a button, to change the backcolor of an item.
So I do this:
objectListView2.Items[0].BackColor = Color.LightSeaGreen;
wn.objectListView2.Refresh();
If the list is an ObjectListView this works.
If the list is a fastlistview, this does not work.
I am using latest version of the component.
Hope you can help clarify things.
Thanks,
Vlad
|
|
|
|

|
If the collection of ModelObject contains two or more equal objects (IEquatable), then some functions of OLV may work on the wrong object.
It's due to some OLV functions use the function"IndexOf(ModelObject)" that returns the first object found, which may be different from the wished object
|
|
|
|

|
If the "CheckBoxes" property of a OLV is true, then the first cell can't be editable.
[^]
The first column ("Nom") is editable and the "CellEditActivation" is "CELLEDIT_SINGLECLICK".
If I click on the first cell of a row, I can't edit it, but the F2 key start the cell editing but Enter key do not validate the data entry. The edit of other cells is OK.
|
|
|
|

|
Is it possible to have you add icons to the controls? For each release I add some 'standard' icons to the DataListView, DataTreeListView, FastDataListView, etc...
The code bit is simple:
[System.Drawing.ToolboxBitmap(typeof(System.Windows.Forms.ListView))]
public class FastDataListView : FastObjectListView
Sure, I could create a cool Phil Piper icon for said...but at least it adds a bit of clarification when one adds them to the tool bar in VS.
|
|
|
|

|
An excellent piece of work. Many thanks for sharing it.
|
|
|
|

|
Much Easier! Seriously? I do not think it's much easier! If you overrwride just one user control like this, how fast will run your application?
|
|
|
|
|

|
Hello,
i only have a question. How can i sort the Columns with my own sort rules?
When i click on a column in the Header. It will be sorted but i want sort it by own rules.
Is this possible? When yes how i can do this?
Thank you very much.
Ciao
Niko
|
|
|
|

|
Hi Phillip! Thank you for your magnificent contribution!
I have a question; I have a treelist with one column. In that column I show a two-level tree structure setting the CanExpandGetter, ChildrenGetter and AspectGetter delegates. So far, OK.
However, I'd like to show the checkboxes on the root nodes only. I've tried setting the BooleanCheckStateGetter and BooleanCheckStatePutter with delegates like this:
If (TypeOf x Is clsCapas) = True Then
50: Return CType(x, clsCapas).bState
60: End If
(clsCapas is the root-node type; clsPOI is the child-nodes type); I mean, I've tried to set the booleancheckstate getter and putter only when the object type is root node type, but it doesn't work (i see checkboxes on all nodes)
Could you give me any advice?
Thank you very much!
|
|
|
|

|
I created a class that I have bound to the olv and I was wondring if there is a way to bind various form controls to the olv so when items are selected the controls change automatically and whn updated they update the olv bound object. Then I just serialize the class to save and load the data.
|
|
|
|

|
Thanks for the nice work, Phil. I just started to architecture a new application and I am looking for some custom wpf listviews that could be integrated with MVVMLight framework. After reading through the article, it seems to me the design is a little bit 'too old' ( sorry to say that). I am waiting eagerly for your 3.0 version. Should 3.0 version good for Windows App?
|
|
|
|

|
Here is the code I am using (in objectListViewHeadings_SelectedIndexChanged),
which is triggered from another method.
TextMatchFilter filter = new TextMatchFilter(this.objectListViewHeadings, m_strStandardPrefix);
OLVColumn[] col = new OLVColumn[1];
col[0] = prefixColumn1;
filter.Columns = col;
this.objectListViewHeadings.ModelFilter = filter;
this.objectListViewHeadings.DefaultRenderer = new HighlightTextRenderer(filter);
The prefixColumn1 is the 1st column in my olv.
However, cells containing the search string (m_strStandardPrefix) in other
columns are also highlighted.
What am I doing wrong? I am using ObjectListView 2.5, Win7, and VS2008.
Thanks,
Don
|
|
|
|

|
I do this code but it not update the dataListView.
IEnumerable reports = ReadDeliveryData();
dataListView1.ClearObjects();
dataListView1.SetObjects(reports);
foreach (DeliveryReport data in dataListView1.Objects)
{
//get status base on code
string status = GetStatus(data.Code);
// then refresh datalist
data.Status=status;
dataListView1.RefreshObject(data));
}
I use the current version of ObjectListView in the download section above. Could you please show me why? Thank you.
ChungPn
modified 30 Nov '12 - 3:47.
|
|
|
|

|
I know I will have a use for this somewhere! Nice Work!
I also read this blog entry[^] of yours, and I have to agree with everything you said there.
Again, nice work!
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
Hi Phillip Piper, first of all, i apologize for my bad english, i'm learning it. I'm only speak spanish.
I use your project in one of mine. It is very useful and easy to use, but recently, I had the need to select an especific row in the list after to re-asign a DataSet containing the data (like to remember the position of it), to do it, i catch the SelectedObject with "GetSelectedObjet" method, then clean the selection with "SelectObject(null)" and then I update the dataset and re-asign it to the ListView again.
When I try to select the remembered object with "SelectObject(myobject);" it doesn't anything. I guess that it is for the "myobject" saves a reference to object in ListView, and when i clear the selection of it and re-asign the data, it reference lost.
Would be nice if you implement a method in that we can select an object passing the index!
|
|
|
|

|
Hi!
How can I make expandle TreeListView where my child object is of a diffrent type than my roots objects ?
Lets say I have
class Books
{
string title;
list pages;
}
class Page
{
string mytext;
string comment;
int pagenum;
}
In the examples I seen root and child objects is always the same type.
Br
Jimmy
|
|
|
|

|
Hi, can you suggest me an easy way to calculate sum for column and for row ?
Is there such an event that i use to do this sum for each row ?
It is possible to have a global footer in which i show the column totals ?
Bye, Giuseppe.
|
|
|
|

|
Hi, Thank you, it's great!
Are you still working on RightToLeft print support? What's the result?
Please answer me, MAbolghasemi@yahoo.com
|
|
|
|

|
Hi,
I use a ObjectListView with a checkbox for each items. I precheck with the BooleanCheckStateGetter.
My program look like http://img255.imageshack.us/img255/7892/testscanexcutionmicroso.png[^]
and the code look like :
Private Sub InitializeOlvChaines(Listechaine As List(Of ChannelDVBT))
Dim tlist As TypedObjectListView(Of ChannelDVBT) = New TypedObjectListView(Of ChannelDVBT)(olvChaines)
tlist.GenerateAspectGetters()
tlist.BooleanCheckStateGetter = Function(c As ChannelDVBT)
Dim tc As TypeChannelSimplified = Typechannel(c.ServiceType)
If tc = TypeChannelSimplified.Tv Then
Return c.EcmPids.Length = 1 OrElse (c.EcmPids.Length > 1 AndAlso chkCryptageDVBT.Checked)
ElseIf tc = TypeChannelSimplified.Radio Then
Return chkRadioDVBT.Checked
Else
Return False
End If
End Function
End Sub
But I can't change the state of the checkbox with the mouse !
How can I do to change this behavior ?
Thanks
|
|
|
|

|
This is the best custom control I ever seen before... Thumbs up and thank you so much for sharing this
Niklas Henricson
|
|
|
|
|

|
Hi, I'm using the CellEditValidating to validate user inputs. Depending on the user inputs, I may wish to disallow the user input and revert back to the original value before the cell was edited. I've tried some methods like e->NewValue = e->Value, but it does not work. From what I know, the event will ignore any changes and continue to use the initial value of e->NewValue. Is there an alternative method for me to acheive my purpose? Thanks in advance!
|
|
|
|

|
Hi
First of all thanks this great ObjectListView. But i have a little problem with this line:
objectListView1->ClearAll();
error message:
error C2039: 'ClearAll' : is not a member of 'BrightIdeasSoftware::ObjectListView'
But i dont what is the problem...
i hope somebody will help me.
|
|
|
|
|

|
I have some problems to select some Objects in the TreeListView.
How i will get the Index of some objects?
TreeListView.SelectObject(TreeListView.GetModelObject(...), True)
How will i Get the Focus of the Item in Tree
I have make a Test with i will check the First One in the TreeList
TreeListView.SelectObject(TreeListView.GetModelObject(1), True)
but when the First Item is not in the displayed Area you will see nothing.
I have tried it directly with
TreeListView.SelectedObject = l_Object
but it don't works, too.
l_Object is a Obeject from a dictionary
I have connect this dictionary to the root of the Tree.
TreeListView.Root = Dictionary
Thank you very much for Help.
modified 24 Oct '12 - 15:54.
|
|
|
|

|
Hello
Im using the GroupFormatter to give a Custom title for groups but ran into an Issue where the first item dont use the custom title. Settings I used are:
ShowItemCountOnGroups = true;
GroupFormatter = delegate(OLVGroup group, GroupingParameters parms) {
parms.TitleFormat = "{0}, {1} localized text";
};
Or are there a better way to localize the [# items] text?
Regards
Jonas Christensen
|
|
|
|
|

|
This is reproduceable by creating a TypedObjectListView, generating aspect getters with it, populating the OLV with some data, then calling ClearObjects.
public TypedAspectGetterDelegate AspectGetter {
get { return this.aspectGetter; }
set {
this.aspectGetter = value;
if (value == null)
this.column.AspectGetter = null;
else
this.column.AspectGetter = delegate(object x) {
return this.aspectGetter((T)x); };
}
}
|
|
|
|

|
I have a question regarding referencing the DLL as mentioned in "2. Use ObjectListView.dll". I've followed the instructions and successfully referenced ObjectListView.dll which is in my project folder. However I am wondering if I were to take a copy of my current project and run it on another PC. Would ObjectListView still work? Thanks in advance.
|
|
|
|

|
I can swap two objects in the ObjectListview.Objects, but I don't know how refresh the ListView.
ObjectListView.RefreshObject() and ObjectListView.RefreshObjects() don't work !
Dim listechaine As ArrayList = CType(olvChaines.Objects, ArrayList)
Dim temp As Object = listechaine(olvChaines.SelectedIndices(0))
listechaine(olvChaines.SelectedIndices(0)) = listechaine(olvChaines.SelectedIndices(0) - 1)
listechaine(olvChaines.SelectedIndices(0) - 1) = temp
olvChaines.RefreshObject(listChaine(olvChaines.SelectedIndices(0) - 1))
olvChaines.RefreshObject(listChaine(olvChaines.SelectedIndices(0)))
olvChaines.RefreshObjects(listchaine)
|
|
|
|

|
I have a background worker that needs to access the items in a ObjectListView. This was possible in a ListView using a delegate. However, now that I replaced it with a ObjectListView, I can’t seem to get the delegate right. I modified the Listview code that had been wrote for this but it throws a System.MissingMethodException.
private delegate BrightIdeasSoftware.ObjectListView.ListViewItemCollection GetItems(BrightIdeasSoftware.ObjectListView lstview);
private BrightIdeasSoftware.ObjectListView.ListViewItemCollection GetListViewItems(BrightIdeasSoftware.ObjectListView lstview)
{
BrightIdeasSoftware.ObjectListView.ListViewItemCollection temp = new BrightIdeasSoftware.ObjectListView.ListViewItemCollection(new BrightIdeasSoftware.ObjectListView());
if (!lstview.InvokeRequired)
{
foreach (BrightIdeasSoftware.OLVListItem item in lstview.Items)
temp.Add((BrightIdeasSoftware.OLVListItem)item.Clone());
return temp;
}
else
return (BrightIdeasSoftware.ObjectListView.ListViewItemCollection)this.Invoke(new GetItems(GetListViewItems), new object[] { lstview });
}
loop in the dowork method:
foreach (BrightIdeasSoftware.OLVListItem item in GetListViewItems(appListOLV))
{
if (item.Checked == true)
{
//do something
}
}
I get the following exception on the line temp.Add((BrightIdeasSoftware.OLVListItem)item.Clone());
System.MissingMethodException:{"No parameterless constructor defined for this object."}
Any ideas?
Thank you!
Mane
|
|
|
|

|
AutoCheck Property : when u check/uncheck a node in tree the children should be check/uncheck and state of parents will changed
I derived TreeListView2 from TreeListView to do that as below:
public partial class TreeListView2 : TreeListView
{
public TreeListView2()
{
InitializeComponent();
}
#region AutoCheck
private bool autoCheck = true;
[DefaultValue(true)]
public bool AutoCheck { get { return autoCheck; } set { autoCheck = value; } }
private void setChecked(object obj, bool isChecked)
{
if (obj == null)
return;
this.SetObjectCheckedness(obj, isChecked ? System.Windows.Forms.CheckState.Checked : System.Windows.Forms.CheckState.Unchecked);
base.PutCheckState(obj, isChecked ? System.Windows.Forms.CheckState.Checked : System.Windows.Forms.CheckState.Unchecked);
if (autoCheck && CanExpandGetter(obj))
{
foreach (object child in ChildrenGetter(obj))
setChecked(child, isChecked);
foreach (object child in ChildrenGetter(obj))
if (IsChecked(child) != isChecked)
{
Console.WriteLine((obj as Behandish.Tree.ITreeNode).Name);
}
}
}
private void setParentChecked(object modelObject)
{
if (!autoCheck)
return;
Behandish.Tree.ITreeNode parentObj = (modelObject as Behandish.Tree.ITreeNode).Parent;
while (parentObj != null)
{
IEnumerable brothers = this.ChildrenGetter(parentObj);
int checkedCount = 0;
int brotherCount = 0;
bool isIndeterminate = false;
foreach (Behandish.Tree.ITreeNode brother in brothers)
{
brotherCount++;
if (this.CheckStateMap.ContainsKey(brother))
{
System.Windows.Forms.CheckState cs = this.CheckStateMap[brother];
if (cs == System.Windows.Forms.CheckState.Checked)
checkedCount++;
else if (cs == System.Windows.Forms.CheckState.Indeterminate)
{
isIndeterminate = true;
break;
}
}
}
if (isIndeterminate)
this.CheckIndeterminateObject(parentObj);
else if (checkedCount == 0)
this.UncheckObject(parentObj);
else if (checkedCount == brotherCount)
this.CheckObject(parentObj);
else this.CheckIndeterminateObject(parentObj);
parentObj = parentObj.Parent;
}
}
bool checking = false;
protected override System.Windows.Forms.CheckState PutCheckState(object modelObject, System.Windows.Forms.CheckState state)
{
if (!checking)
{
checking = true;
setChecked(modelObject, state == System.Windows.Forms.CheckState.Checked);
setParentChecked(modelObject);
checking = false;
}
return base.PutCheckState(modelObject, state);
}
#endregion
}
modified 17 Oct '12 - 5:52.
|
|
|
|

|
Thanks for making this OLV
|
|
|
|

|
Hi Philip,
Could you please list your intent with using GPL3 license? I am not a lawyer and find the meaning applied to a library difficult to understand. In particularly: can I use this in a commercial application?
Thanks
|
|
|
|

|
Hi, I found ObjectListView very useful to my project, however I've got a small problem in displaying the image for my MultiImageRenderer. I'm using C++
This is what I did:
Create a new MultiImageRenderer
(this->multiImageRenderer1 = (gcnew BrightIdeasSoftware::MultiImageRenderer());)
Set the specific column I want to add this renderer
(AspectName = PRIORITY, Renderer = multiImageRenderer1)
Set the MultiImageRenderer
(ImageList = imageList, ImageIndex = 1, MaximumValue = 6, MaxNumberImages = 5, MinimumValue = 0)
This is all done using design properties.
The result I've got is just integers (eg. 0, 5 etc) in the column. I think I am missing something, but I couldn't figure out what. I'm also unable to find any step by step documentation to do this. Any help would be much appreciated. Thanks
|
|
|
|

|
Hi,
Does the problem when it comes to the checkbox in the zero column already alvailable in 2.5.1 version?
I'm still using the 2.5.0 and have problem in zero column with checkbox. The check box is readonly and cannot changed it's state.
Thanks
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|

|
very nice things.. thanks for this..
|
|
|
|

|
Have you considered the BitConverter class?
const int PropertyTagFrameDelay = 0x5100;
PropertyItem FrameDelayProperty = this.image.GetPropertyItem(PropertyTagFrameDelay);
for (int i = 0; i < this.frameCount; i += 1){
uint delay = BitConverter.ToUInt32(FrameDelayProperty.Value, i * 4) * (uint)10;
this.imageDuration.Add((int)delay);
}
I'm not dumb I just have a huge command of thouroughly usless infromation.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
An easier to use ListView that supports sorting, grouping, editing, overlays, and drag-n-drop.
| Type | Article |
| Licence | GPL3 |
| First Posted | 17 Oct 2006 |
| Views | 2,561,664 |
| Downloads | 77 |
| Bookmarked | 1,540 times |
|
|