[OPEN] [#618] CheckboxSelectionModel's AllowDeselect not working

  1. #1

    [OPEN] [#618] CheckboxSelectionModel's AllowDeselect not working

    On version 2.x, it was possible to deselect a record when CheckboxSelectionModel's AllowDeselect is set to true.

    But on version 3.x, it's not possible to deselect the record when CheckboxSelectionModel's AllowDeselect is set to true.

    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
    </head>
    <body>
        <ext:ResourceManager runat="server" ScriptMode="Debug" />
        <ext:GridPanel ID="_grd" Title="Ext.Net" Width="500" Height="500" runat="server">
            <Store>
                <ext:Store AutoLoad="true" ID="_str" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="/Example/LoadFakeRecords/">
                            <ActionMethods Read="POST" />
                            <Reader>
                                <ext:JsonReader Root="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model IDProperty="ID" runat="server">
                            <Fields>
                                <ext:ModelField Name="ID" Type="String" />
                                <ext:ModelField Name="Name" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Text="ID" DataIndex="ID" runat="server" />
                    <ext:Column Text="Name" DataIndex="Name" runat="server" />
                </Columns>
            </ColumnModel>
            <SelectionModel>
                <ext:CheckboxSelectionModel Mode="Single" AllowDeselect="true" runat="server" />
            </SelectionModel>
        </ext:GridPanel>
    </body>
    </html>
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Index()
            {
                return View();
            }
    
            public StoreResult LoadFakeRecords()
            {
                List<Person> lst = new List<Person>();
    
                for (int index = 0; index < 15; index++)
                {
                    lst.Add(new Person
                    {
                        ID = index,
                        Name = "Name" + index,
                    });
                }
    
                return new StoreResult(lst, lst.Count());
            }
        }
    
        [Serializable]
        public class Person
        {
            public int ID { get; set; }
    
            public string Name { get; set; }
        }
    }
    Last edited by Daniil; Dec 21, 2014 at 3:34 PM. Reason: [OPEN] [#618]
  2. #2
    Hi Raphael,

    Thank you for the report. Created an Issue.
    https://github.com/extnet/Ext.NET/issues/618

    It appears to be fixed in ExtJS 5.1.0 according to Release Notes.
    http://docs.sencha.com/extjs/5.1/wha...ase_notes.html

    EXTJS-15625 Checkbox selection models do not allow select / deselect when allowDeselect:true
    So, I will review after incorporating ExtJS 5.1.0 to confirm it is fixed or not.
    Last edited by Daniil; Jan 14, 2015 at 12:11 PM.
  3. #3
    Thank you Daniil. Please keep me posted about any update.
  4. #4
    To overcome the issue presented above it's necessary to set GridPanel's AllowDeselect.

    Setting CheckboxSelectionModel's AllowDeselect has no effect.
  5. #5
    Thank you. At least, we have an option now to get it working.

    Added a note in the Issue and it will be needed to review again after the next ExtJS upgrade.
  6. #6
    Thank you Daniil
  7. #7
    It would be interesting to take a look on: http://forums.ext.net/showthread.php...s-set-to-Multi
  8. #8
    The issue is also present on RowSelectionModel: http://forums.ext.net/showthread.php...is-not-working
  9. #9
    Hello!

    Seems Sencha claimed the corresponding bug report as fixed while we repeatedly noticed it wasn't really fixed. We should reproduce this issue on pure ExtJS (using their fiddle.sencha.com for example) and report them the issue is still actual. Well, thru the fiddle, find out the issue now happens only on Ext.NET and definitely fix the problem.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 0
    Last Post: Oct 30, 2012, 5:34 PM
  2. Replies: 3
    Last Post: Feb 21, 2012, 7:46 AM
  3. [CLOSED] CheckboxSelectionModel is not working when using filter
    By russ in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jan 05, 2011, 9:57 AM
  4. Replies: 1
    Last Post: Aug 13, 2010, 5:09 PM
  5. [CLOSED] CheckboxSelectionModel not working..
    By Satyanarayana murthy in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 20, 2009, 11:01 AM

Posting Permissions