Forum  Commercial Foru...  Commercial Foru...  [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc)
Previous Previous
 
Next Next
New Post 3/27/2012 9:54 AM
  dmcgrail
274 posts
4th Level Poster


[Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc) 
Modified By dmcgrail  on 3/27/2012 1:57:01 PM)

I'm basically writing an Open/Save File "Common Dialog".  So, that's why I'm discovering this stuff (including yesterday's bug I submitted).  Here's some things I've noticed:

(again, use the 'Open File' menu option of your browser and you'll get the Common Dialog I'm modeling after - Windows O/S, of course)

1. In Details View you'll notice there is mutliple columns (e.g. Name, Size, Type, Date Modified, etc).  There is no MultiSelect (so I have it set to False) and it's not a FullRowSelect (again, set to False).  If I right or left click in any of the columns not named 'Name' (anything other than the first column), the previously selected item loses focus.  Or, well, you don't see it selected anymore.  But when you press F2 (to rename) the one that was once selected is the one that's renamed.  Anyhow, in WebGUI, clicking in these other columns selects a new row.  Minor, but something I noticed.  (FYI, I have SelectOnRightClick set to True).

2. As I mentioned, I have SelectOnRightClick set to True.  Selecting something by Right Click does *not* fire off the SelectedIndexChanged event.  I'm thinking that's a pretty big bug.

3. Also notice the Windows Common Dialog.  If you right-click the name column you get one type of Context Menu.  When you right-click the other columns you get another type of Context Menu (different menu items).  How can I easily associate a ContextMenu with a column?  As opposed to the whole ListView?  Setting the contextMenu of a ListViewItem does nothing.

4. Regardless, to move on, I set the ContextMenu of the ListView.  Right-clicking in the first column does not bring up the ContextMenu!  It only works in the other columns.  That seems like a pretty big bug too.

5. One of the Context Menu options is rename.  But, there is no implementation of ListViewItem.BeginEdit().  How does one rename while in the ListView?

6. EnsureVisible doesn't seem to be working.  Tried both:

            listView1.EnsureVisible(listView1.SelectedIndex);
            listView1.SelectedItem.EnsureVisible();

    When I create a New Folder I added it to the ListView (which would be the last item) and then try to make it visible.

EDIT: I'm Using 6.4b

Is there a work-around for #2? #4? #5? and #6?  Those are most important to me.

 
New Post 3/27/2012 1:18 PM
  palli
14307 posts
1st Level Poster




Re: [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc) 

Hi Dan,

Thanks for the report(s).

#1 : I checked this in Windows Forms ListView and found the behaviour is a little different. I don't think the Windows Forms ListView will keep track of the last selected item before you clicked outside of column 1, but it at least doesn't select the new row and it clears the selection so I opened a new tracker entry to decide if this is the target behaviour when FullRowSelect=False. Please view it here and follow up on our progress.

#2 : I tested this in IE9 in the upcoming 6.4.0 Release d and found SelectedIndexChanged to fire every time.

#3 : By assigning the contextmenu to the ColumnHeaders, like:

 

            listView1.Columns[0].ContextMenu = this.contextMenu1;
            listView1.Columns[1].ContextMenu = this.contextMenu2;

#4 : Also fixed in upcoming 6.4.0 Release d

#5 : Two possible options at first glance. a) Fire up a dialog. b) Make the first column of type Control, keep a TextBox instance in the column and upon selecting rename, enable the Textbox.

#6 : This is a known problem for ListViewItem that has been added to the server-side but not yet drawn/registered at the client. We do have an open tracker entry on it, with a fairly good workaround that I just made sure was working in upcoming 6.4.0 Release d. Please view it here and follow up on our progress.

Hope this answers your questions and most of your needs.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 3/27/2012 2:14 PM
  dmcgrail
274 posts
4th Level Poster


Re: [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc) 

#1.  I thought so too (not keeping track of last selected item), but then when I clicked outside the first column it lost the selection.  Then, I followed that with an 'F2' (to rename) and it put the previously selected item into 'Rename mode'.  And I can click around all over the place in the 'Other Columns' and still have it consistently find the previously selected one (when pressing F2).

#5.  So, you are saying we'll never have BeginEdit?  Right now I have the dialog, just to quickly get something done.  But I don't like that.  I'll probably try "b" at some point.

General comment: Man do I need that 6.4d!!!! :)

 
New Post 3/27/2012 2:20 PM
  palli
14307 posts
1st Level Poster




Re: [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc) 

Hi Dan,

#1 : You are comparing to the Common Dialog of Windows, right ? In any case, I compared it to Windows Forms ListView and it's now in the hands of the developers to decide.

#5 : ListView is by default a read-only list and I have seen no plans for any edit mode, except for the one already implemented using a control type column for instance. There are other options though. You might want to implement it as a Collapsible panel, simplar to the CompanionKit's sample .

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 3/27/2012 4:30 PM
  dmcgrail
274 posts
4th Level Poster


Re: [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc) 

#5 - I'll take a look.

And not to belabor the point, I just thought that Gizmox wanted to be true to WinForms: msdn.microsoft.com/en-us/library/system.windows.forms.listviewitem.beginedit.aspx

 

 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  [Bugs?] ListView - Multiple (context menu's, SelectOnRightClick, BeginEdit, etc)
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS