 |
|
 |
First i really want to thank you on this wonderful control.
I am trying to get the idex of the selected item when view_SelectedIndexChanged is fired there's no SelectedIndex???
Thanks a lot for your help
|
|
|
|
 |
|
 |
Please ignor my question.Sorry for this post i got mix up between listview and listbox
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
i cannot get selected sub item?
if (view.SelectedIndices.Count>0)
{
int valor = view.SelectedIndices[0];
XPListview.XPListViewItem s = view.Items[valor];
string[] v1 = {s.SubItems[1].Text,s.SubItems[2].Text, s.SubItems[3].Text};
}
this not work!
|
|
|
|
 |
|
 |
when groups are enabled, sorting items does not have any visual effect. The "sort order" within a group seems to be the order that items were added. The recommended index for InsertItem is also ignored.
has anybody managed to do proper sorting _within_ a group?
thanks
nikos
|
|
|
|
 |
|
 |
Setting UseItemStyleForSubItems to true does not propagate the parent XPListViewItem's drawing information to its SubItems.
Fine control, tho.
|
|
|
|
 |
|
 |
How do I change the color on every other row.
When I try this I only get the first column to change color on every other row.
Need som help.
/Fredrik
|
|
|
|
 |
|
 |
At line 61 in XPListViewItemCollection.cs
return ((XPListViewItem)this[displayIndex]);
This makes impossible to use any index.
Anybody got a solution for that?
[]'s
r.
|
|
|
|
 |
|
 |
Well, I just got a solution.
If you are inside of an event, instead of casting the sender object into a XPlistview, cast it to a ListView object and work as if you were using the listview control.
ListView lView = (ListView)sender;
ListViewItem xItem = lView.Items[lView.SelectedIndices[0]];
[]'s
r.
|
|
|
|
 |
|
 |
you should leave the casting to XPListViewItem, and call the base instead of this:
The buggy code:
public new XPListViewItem this[int displayIndex] {
get {
return ((XPListViewItem)this[displayIndex]);
}
set {
this[displayIndex] = value;
}
}
change it to:
public new XPListViewItem this[int displayIndex] {
get {
return ((XPListViewItem)base[displayIndex]);
}
set {
base[displayIndex] = value;
}
}
|
|
|
|
 |
|
|
 |
|
 |
When compiling the project I'm getting the following error:
C:\Documents and Settings\Simon\My Documents\Visual Studio Projects\XPListview\XPListViewItemCollection.cs(59): 'XPListview.XPListViewItemCollection.this[int]' hides inherited member 'System.Windows.Forms.ListView.ListViewItemCollection.this[int]'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
As a complete beginner in .net (particularly c#, coming from a vb6 background *grin*), I have little (no) clue as to what this means, or how to fix this, but I'm very eager to learn.
Appreciate any help coming my way!
Simon
|
|
|
|
 |
|
 |
Hello!
And thank you for your great and fascinating Control.
I do really love to use it but i have to use "lvwSuche.Items[0].Selected == true"
so that if some items are existing, the first one should be selected by some conditions.
Afterall i become always a System.StackOverflowException here:
public XListViewItem this[int displayIndex]
{
get
{
return ((XListViewItem)this[displayIndex]);
}
set
{
this[displayIndex] = value;
}
}
Please help me
Regards, Laszlo Varga
|
|
|
|
 |
|
 |
modify the code as below:
public XListViewItem this[int displayIndex]
{
get
{
return ((XListViewItem)base[displayIndex]);
}
set
{
base[displayIndex] = value;
}
}
Xu Lifu
|
|
|
|
 |
|
 |
Hello
I'm having problems using the Visual Styles.
If I use the image don't refresh when record get over it
If I use it, when I select a record I cannot deselect.
Have you haver get this error? How did you resolve it?
tkx in advance
(())
Paulo Aboim Pinto
Odivelas - Portugal
|
|
|
|
 |
|
 |
we have to define the SmallImageList and LargeImageList for this work perfectly.
|
|
|
|
 |
|
 |
I've implemented this feature after reading the article: http://www.codeproject.com/cs/miscctrl/extlistviewarticle.asp
I just change the WndProc method in XPListView.cs:
protected override void WndProc(ref Message m) {
base.WndProc(ref m);
if (this.Items.Count == 0)
{
_b = true;
Graphics g = this.CreateGraphics();
int w = 0;
w = this.Width;
w -= g.MeasureString(_msg, this.Font).ToSize().Width;
w = w/2;
g.DrawString(_msg, this.Font, SystemBrushes.ControlText, w, 30);
}
else
{
if (_b)
{
this.Invalidate();
_b = false;
}
}
switch (m.Msg) {
case ListViewAPI.OCM_NOTIFY:
ListViewAPI.NMHDR lmsg = (ListViewAPI.NMHDR) m.GetLParam(typeof(ListViewAPI.NMHDR));
switch (lmsg.code) {
case (int)ListViewAPI.NM_CUSTOMDRAW:
NotifyListCustomDraw(ref m);
break;
case (int)ListViewAPI.LVN_GETDISPINFOW:
break;
case (int)ListViewAPI.LVN_ITEMCHANGING:
break;
default:
break;
}
break;
}
}
Add this variable as global in the class:
private bool _b = true;
private string _msg = "There are no items to show in this view";
Hope you can add this feature to the download version
(())
Paulo Aboim Pinto
Odivelas - Portugal
|
|
|
|
 |
|
 |
Hi,
Thanks heaps for sharing
I have translated this to VB.NET and got the groups working fine, except that the group headers aren't bold. I have looked through your code and done a bit of debugging and I am passing the same parameters in the SendMessage calls. Did you have to do anything in particular to get the group headers to display properly or do you just do the SendMessage call?
Thanks
Calum
|
|
|
|
 |
|
 |
Hi,
Figured it out. You need to set the defaults for NM_CUSTOMDRAW in the WndProc Sub...
If anyones interested...
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Select Case m.Msg
Case OCM_NOTIFY
Dim lmsg As NMHDR = CType(m.GetLParam(GetType(NMHDR)), NMHDR)
Select Case lmsg.code
Case NM_CUSTOMDRAW
m.Result = New IntPtr(CDRF_DODEFAULT)
End Select
End Select
End Sub
Cheers
Calum
|
|
|
|
 |
|
 |
I'm using your control in conjunction with a treeview control.
When I select an item in the listview control, a background color emphasized this selected item (it's a standard behaviour).
Now, when I select an item in the treeview control, the backgroup color of the selected item in the listview disappeared. But internally this item is always selected (I can retrieve it by program). What's wrong ?
|
|
|
|
 |
|
 |
I can't add an ListViewItem in DesignMode.
Because my Project deletes the Items when Compiling.
I want to use this awesome control
Can any one help?
Thx
|
|
|
|
 |
|
 |
Is it possible to make the groups collapsable?
"Try Not! Do. Or Do Not. There is no Try..." Master Yoda
|
|
|
|
 |
|
 |
Yes, but you have to intercept the window messages and do custom painting. It just takes quite a bit of extra work.
|
|
|
|
 |
|
 |
Hello
Is there any other way, then to use the AutoGroupByColumn function to add a group. The thing I want is to add a group manuel, so when I start a new section, in the listview, I first add the group to name the section.
Thanks in advanced
|
|
|
|
 |