PDA

View Full Version : [CLOSED] Make readonly gridpanel columns skip on tab



rbtceo
Apr 07, 2014, 4:41 AM
Hello Everyone,

Is there any way to skip read-only gridPanel columns on tab selection?

Thank you.

Off-topic: my organisation has paid for the Ext.Net licence. Does it make me a premium member. If yes, how to change the account?

geoffrey.mcgill
Apr 07, 2014, 4:36 PM
Off-topic: my organisation has paid for the Ext.Net licence. Does it make me a premium member. If yes, how to change the account?

Hello. Your forum account has been upgraded to a Premium Member, and I've moved this thread into the Premium Help forum.

Daniil
Apr 07, 2014, 5:33 PM
Hi @rbtceo,

Welcome to the Ext.NET forums!

The non-editable cells should be skipped by default. Please run this example, double click the first cell and press Tab.

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", "test", "test" },
new object[] { "test", "test", "test" },
new object[] { "test", "test", "test" }
};
}
}
</script>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:GridPanel ID="GridPanel1" runat="server">
<Store>
<ext:Store runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="test1" />
<ext:ModelField Name="test2" />
<ext:ModelField Name="test3" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Test 1" DataIndex="test1">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" Text="Test 2" DataIndex="test2" />
<ext:Column runat="server" Text="Test 3" DataIndex="test3">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<Plugins>
<ext:CellEditing runat="server" />
</Plugins>
</ext:GridPanel>
</form>
</body>
</html>

rbtceo
Apr 07, 2014, 11:46 PM
Thank you.

The problem caused:

<SelectionModel>
<ext:CellSelectionModel runat="server" />
</SelectionModel>

Mark the thread as closed.

Daniil
Apr 08, 2014, 12:18 AM
Yes, a CellSelectionModel behaves in a different way. If you need the RowSelectionModel/CheckboxSelectionModel's behavior for a CellSelectionModel, please try this override:

<head runat="server">
<script>
Ext.override(Ext.selection.CellModel, {
onEditorTab: Ext.selection.RowModel.prototype.onEditorTab
});
</script>
</head>

rbtceo
Apr 08, 2014, 2:34 AM
Thank you.

Mark the thread as solved.