PDA

View Full Version : [OPEN] [#108] GridPanel.selMode: problem it CheckboxSelectionModel after update from SVN



supera
Aug 27, 2012, 5:10 PM

Vladimir
Aug 27, 2012, 7:02 PM
Editor try to select editor cell therefore selection is dropped
I suggest to add the following config to checkbox selection model


selectByPosition : Ext.emptyFn,

supera
Aug 27, 2012, 8:15 PM

Vladimir
Aug 27, 2012, 8:32 PM
Where did you add 'selectByPosition : Ext.emptyFn,'?
I added it to selection model in your sample and it works (selection is not droppped)

supera
Aug 27, 2012, 8:46 PM

Vladimir
Aug 27, 2012, 8:54 PM
Your last sample doesn't reproduce the issue on my side

Daniil
Aug 28, 2012, 4:23 AM
Your last sample doesn't reproduce the issue on my side

+1, I can't reproduce as well.

Also I think the issue looks a bug. I have reported to Sencha.
http://www.sencha.com/forum/showthread.php?239717

supera
Aug 28, 2012, 11:27 AM

supera
Aug 28, 2012, 11:43 AM
More data about my Dlls...

4687
4688

Daniil
Aug 28, 2012, 12:16 PM
2 - When edit on cell of column 'Qtde', all rows are deselected and only the row of current cell is selected.


The rows leave selected. This

selectByPosition : Ext.emptyFn
should fix it.


3 - If i click in another row, the last row edited (and selected) is deselected...


It is reproducible. Agree, I think it should not be deselected. We will investigate.

Daniil
Aug 28, 2012, 1:37 PM
It is reproducible. Agree, I think it should not be deselected. We will investigate.

I think it is a bug. Here is a test case. The steps:

1. Select the row.
2. Click the Edit button.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Store store = this.GridPanel1.GetStore();
store.DataSource = new object[]
{
new object[] { "test" }
};
store.DataBind();
}
}
</script>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />

<ext:GridPanel ID="GridPanel1" runat="server">
<Store>
<ext:Store runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="test" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Test" DataIndex="test" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel runat="server" />
</SelectionModel>
</ext:GridPanel>

<ext:Button runat="server" Text="Edit">
<Listeners>
<Click Handler="App.GridPanel1.store.getAt(0).set('test', 'new value')" />
</Listeners>
</ext:Button>

<ext:Button runat="server" Text="hasSelection">
<Listeners>
<Click Handler="alert(App.GridPanel1.getSelectionModel().hasSelect ion());" />
</Listeners>
</ext:Button>
</body>
</html>

I reported it to Sencha.
http://www.sencha.com/forum/showthread.php?239804

I think they will open a bug ticket.

Do you need any workaround for now or can you wait a permanent fix from Sencha?

Daniil
Aug 28, 2012, 1:45 PM
Also I think the issue looks a bug. I have reported to Sencha.
http://www.sencha.com/forum/showthread.php?239717

They opened a bug ticket.



I reported it to Sencha.
http://www.sencha.com/forum/showthread.php?239804


They have already answered! It was already fixed. It will be included in Ext.NET when we update to ExtJS 4.1.2.

supera
Sep 03, 2012, 12:34 PM
Hi Daniil!

Thanks alot for your dedication!!!

You think that the ExtJS 4.1.2 will be update in Ext.net project in near time?

If no, I need a workarround...

Daniil
Sep 03, 2012, 2:10 PM
You think that the ExtJS 4.1.2 will be update in Ext.net project in near time?

I don't think it will take less than a month.


If no, I need a workarround...

Please try to add

e.grid.getView().refresh();
into the "edit' listener of the editing plugin.

Example

plugins: [{
ptype: "cellediting",
listeners: {
edit: {
fn: function (editor, e) {
e.grid.getView().refresh();
}
}
}
}]

supera
Sep 04, 2012, 11:37 AM
Hi Daniil!

The workarround works very fine!

Thanks a lot.

Daniil
Dec 29, 2012, 8:28 AM
This appears to be not fixed yet.
http://www.sencha.com/forum/showthread.php?239717

Opened an Issue to track it.
https://github.com/extnet/Ext.NET/issues/108

Another issue which required this workaround

edit: {
fn: function (editor, e) {
e.grid.getView().refresh();
}
}
has been fixed.

So, you can remove this workaround.

supera
Dec 31, 2012, 12:44 PM

Daniil
Dec 31, 2012, 1:22 PM
The "2" branch uses ExtJS 4.1.1. But it was fixed in ExtJS 4.1.2.

The "2.1" branch uses ExtJS 4.1.2.

The trunk uses ExtJS 4.2.0 beta and yes, we don't recommend to use the beta version in production.

supera
Jan 02, 2013, 9:31 AM
The "2" branch uses ExtJS 4.1.1. But it was fixed in ExtJS 4.1.2.

The "2.1" branch uses ExtJS 4.1.2.

The trunk uses ExtJS 4.2.0 and yes, we don't recommend to use the beta version in production.

Hi Daniil!

Thanks a lot for your clarified about the versions in SVN!!!!

In thread bellow, I get a error in filefield component with branches 2.1 SVN version...

http://forums.ext.net/showthread.php?22807-CLOSED-filefield-error-after-update-sources-from-SVN-4702

What you suggest for me? Redirect my SVN url to 2.1???

Daniil
Jan 02, 2013, 9:33 AM
In thread bellow, I get a error in filefield component with branches 2.1 SVN version...

http://forums.ext.net/showthread.php?22807-CLOSED-filefield-error-after-update-sources-from-SVN-4702

What you suggest for me? Redirect my SVN url to 2.1???

Please continue the mentioned thread posting this question.

supera
Jan 02, 2013, 4:09 PM
Please continue the mentioned thread posting this question.

Hi Daniil!!!

this issue is fixed in SVN sources from /branches/2.1,

Thanks a lot for your help and because you following this thread until the end.

Daniil
Jun 23, 2014, 2:13 PM
The rows leave selected. This

selectByPosition : Ext.emptyFn
should fix it.

I just tested that workaround with the latest Ext.NET and discovered that it is not working anymore. This helps:

selectByPosition : null

Though, I am note sure that doesn't break something else.