May 05, 2012, 11:11 PM
[CLOSED] Store and SqlDataSource Rev >= 3986
Hi, the load an Store use the SqlDataSource, the data is load but not show the data in the gridPanel, the grid show all the data but blank (see Image)
Here is the code, in previous version < 3986 it's work
Thanks
Aurelio
Here is the code, in previous version < 3986 it's work
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="ARWebRevolution.WebForm3" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="">
</ext:ResourceManager>
<ext:Store ID="StoreRegioni" runat="server" DataSourceID="SqlDataSource1"
Namespace="App">
<Model>
<ext:Model ID="ModelRegioni" runat="server" >
<Fields>
<ext:ModelField Name="RegId" Mapping="RegId"/>
<ext:ModelField Name="RegDes" Mapping="RegDes"/>
</Fields>
</ext:Model>
</Model>
</ext:Store>
<div>
<ext:Panel ID="PanelContinenti" runat="server" Region="West" Width="300" BodyPadding="3"
Layout="AutoLayout" Split="true">
<Items>
<ext:GridPanel ID="GridPanelContinenti" runat="server" Title="Continenti"
StoreID="StoreRegioni">
<ColumnModel>
<Columns>
<ext:Column runat="server" ID="RegDes" DataIndex="RegDes" Align="Left" Flex="1" Text="Regione" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModelContinente" Mode="Single" runat="server">
</ext:RowSelectionModel>
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</div>
</form>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ARWebRevolutionConnectionString %>"
SelectCommand="SELECT RegId,RegDes FROM [REGIONI]"></asp:SqlDataSource>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ARWebRevolution.Query;
using Ext.Net;
namespace ARWebRevolution
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlDataSource1.DataBind();
}
}
}
}
The test need to load the SqlDataSource.Thanks
Aurelio
Last edited by Daniil; May 07, 2012 at 10:35 AM.
Reason: [CLOSED]