[CLOSED] DateField and parsing problems

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] DateField and parsing problems

    Hi, in two different projects I'm experiencing a parsing error of date in a DateField.
    Sadly I'm not able to create a demo because in demo this works, but I tried to go deep inside and maybe I found something that it could be useful for you.

    The scenario is:
    • GridPanel
    • DataColumn with a DateField as editor
    • DataSet.DataTable as store


    Once the data has been loaded anything has correctly rendered. When I click the DateField the editor does not show the date, like the date were null.
    In that project I'm able to add rows in run-time and this behavior does not occur with that rows.

    I tried to find differences between the demo (witch works) and both projects and I found that the data in the following function is different.
    The function is after this call:

    if (me.fireEvent('beforestartedit', me, me.boundEl, value) !== false)

        
    parseDate: function(value) {
        if (!value || Ext.isDate(value)) {
            return value;
        }
        var me = this,
            val = me.safeParse(value, me.format),
            altFormats = me.altFormats,
            altFormatsArray = me.altFormatsArray,
            i = 0,
            len;
        if (!val && altFormats) {
            altFormatsArray = altFormatsArray || altFormats.split('|');
            len = altFormatsArray.length;
            for (; i < len && !val; ++i) {
                val = me.safeParse(value, altFormatsArray[i]);
            }
        }
        return val;
    }
    in non working project, value is xml-like: 2015-06-27T00:00:00 and val is null
    in working project, value is Sat Jun 27 2015 00:00:00 GMT+0200 (ora legale Europa occidentale)

    it seems that altFormats does not have a format for xml date.

    Demo page is this one:
    <%@ Page Language="vb" AutoEventWireup="false" %>
    
    <!DOCTYPE html>
    <script runat="server">
        
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim rm As New ResourceManager
            Me.form1.Controls.Add(rm)
            Me.form1.Controls.Add(GetGridPanel())
        End Sub
    
        Private Function GetGridPanel() As GridPanel
            
            '
            ' Data Store
            '
            Dim m As New Model
            m.Fields.Add("Num", ModelFieldType.Int)
            m.Fields.Add("Data", ModelFieldType.Date)
    
            Dim s As New Store
            s.ID = "MyStore"
            s.DataSource = GetCustomDataSource()
            s.Model.Add(m)
                
            '
            ' Building Grid
            '        
            Dim grd As New GridPanel With {
                .ID = "MyGrid",
                .Width = 300,
                .Header = 200,
                .Title = "Grid"}
    
            grd.ColumnModel.Columns.Add(New Column With {.DataIndex = "Num", .Text = "Num"})
            grd.ColumnModel.Columns.Add(New DateColumn With {.DataIndex = "Data", .Text = "Data", .Format = "dd/m/Y"})
            grd.ColumnModel.Columns(1).Editor.Add(New DateField With {.Format = "dd/m/Y"})
      
            grd.Store.Add(s)
            
            Dim p As New CellEditing With {.ClicksToEdit = 1}
            grd.Plugins.Add(p)
    
            Return grd
        End Function
        
        Public Shared Function GetCustomDataSource() As System.Data.DataTable
            Dim dt As New System.Data.DataTable
            dt.Columns.Add("Num", GetType(Integer))
            dt.Columns.Add("Data", GetType(Date))
            For n = 0 To 11
                Dim r = dt.NewRow
                r.Item("Num") = n
                r.Item("Data") = Now.Date.AddDays(-1 * (New Random(n)).Next(1000))
                dt.Rows.Add(r)
            Next
            dt.AcceptChanges()
            Return dt
        End Function
    
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    is it something you did experience before?
    Have I been able to give you enough info in order you to help me?

    Thank you, I know that until it works it is difficult to fix... it is complicated to include the whole project.
    I'll carry on investigating.
    Last edited by Dimitris; Jul 09, 2015 at 7:14 PM. Reason: [CLOSED]
  2. #2
    Î’uongiorno,

    As you said, the demo works.

    I converted it to markup and added a call to the parseDate function, which also works with the provided data.

    <%@ Page Language="vb" AutoEventWireup="false" %>
    
    <!DOCTYPE html>
    
    
    <script runat="server">
        
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            MyStore.DataSource = GetCustomDataSource()
            MyStore.DataBind()
        End Sub
        
        Public Shared Function GetCustomDataSource() As System.Data.DataTable
            Dim dt As New System.Data.DataTable
            dt.Columns.Add("Num", GetType(Integer))
            dt.Columns.Add("Data", GetType(Date))
            For n = 0 To 11
                Dim r = dt.NewRow
                r.Item("Num") = n
                r.Item("Data") = Now.Date.AddDays(-1 * (New Random(n)).Next(1000))
                dt.Rows.Add(r)
            Next
            dt.AcceptChanges()
            Return dt
        End Function
    
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
        <script>
            var parseDate = function (item, boundEl, value) {
                if (!value || Ext.isDate(value)) {
                    return value;
                }
                var me = this,
                    val = me.safeParse(value, me.format),
                    altFormats = me.altFormats,
                    altFormatsArray = me.altFormatsArray,
                    i = 0,
                    len;
                if (!val && altFormats) {
                    altFormatsArray = altFormatsArray || altFormats.split('|');
                    len = altFormatsArray.length;
                    for (; i < len && !val; ++i) {
                        val = me.safeParse(value, altFormatsArray[i]);
                    }
                }
                return val;
            };
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:GridPanel
            runat="server"
            ID="MyGrid"
            Title="Grid"
            Width="300">
            <Store>
                <ext:Store
                    runat="server"
                    ID="MyStore">
                    <Model>
                        <ext:Model runat="server">
                            <Fields>
                                <ext:ModelField Name="Num" Type="Int" />
                                <ext:ModelField Name="Data" Type="Date" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column runat="server" DataIndex="Num" Text="Num" />
                    <ext:DateColumn runat="server" DataIndex="Data" Text="Data" Format="dd/m/Y">
                        <Editor>
                            <ext:DateField runat="server" Format="dd/m/Y" />
                        </Editor>
                        <EditorOptions>
                            <Listeners>
                                <BeforeStartEdit Fn="parseDate" />
                            </Listeners>
                        </EditorOptions>
                    </ext:DateColumn>
                </Columns>            
            </ColumnModel>
            <Plugins>
                <ext:CellEditing runat="server" ClicksToEdit="1" />
            </Plugins>
        </ext:GridPanel>
    </body>
    </html>
    Actually, if you debug it, the first condition is always true since the value is a valid date:

    if (!value || Ext.isDate(value)) {
        return value;
    }
    Based on the above, can you add the code and/or data that cause trouble in your case?
  3. #3
    I'll do my best.
  4. #4
    I am not able to reproduce the issue, but it has happened for 3rd time today.
    I built a little framework to make Ext.net more productive controls and it is probably the main reason it happens (sometimes and rarely).

    Is there a way I can save the page or download it or wget the page in order to make you see what happens?
    Any suggestion?

    Thank you.
  5. #5
    Ext.isDate("2014-07-30T00:00:00") returns false

    maybe this helps?
  6. #6
    Ext.isDate("2014-07-30T00:00:00") - well, it returns false as expected.
    http://docs.sencha.com/extjs/5.1/5.1...-method-isDate

    but it has happened for 3rd time today
    Maybe, is it reproducible with a specific date?

    Is there a way I can save the page or download it or wget the page in order to make you see what happens?
    You can try to post the page sources rendered to the browser. For example, in Chrome you can press Ctrl+U and it will open the page sources.

    Also you can deploy the page online and give us a link to test.

    I built a little framework to make Ext.net more productive controls
    Are there any JavaScript overrides?
    Last edited by Daniil; Jul 08, 2015 at 1:45 PM.
  7. #7
    Hi, great idea about publishing the site.
    Well done, you can experience what happens clicking this link
    http://winweb01.bbros.it/bbCRM/Entities/AccountExt.aspx?AccountId=1762

    This is a test page, do anything you want.

    In the bottom part of the form there are 4 appointments, when I click inside a date field, the field becomes blank.
    Watching inside the profiler I get that the Ext.isDate gets a string as parameter, instead of a date

    You can try to add a new record by yourself using the first row (controls are in the column header) then click the green plus button [it is not a filter].
    If you add the record, then the date field will edit date as expected, but if you reload the page this will be blank.

    This site has an asp.net content placeholder, but it happens also without a placeholder and I set ClientMode to static in order to not change controls ID and invalidate my scripts.

    Maybe, is it reproducible with a specific date?
    It seems to me that it happens with any date.

    Are there any JavaScript overrides?
    We did not override any javascript function.

    but it has happened for 3rd time today
    I would mean that it is the 3rd project in which this issue occurs and it is reproducible.


    Thank you very much for the interest, it is much appreciated
  8. #8
    Here is another project in which editing does not work.
    http://winweb01.bbros.it/RichiesteDati/Gestione.aspx
    http://winweb01.bbros.it/RichiesteDati/Admin.aspx
    To edit doubleclick the field.
  9. #9
    Some notes about using the http://winweb01.bbros.it/bbCRM/Entit...AccountId=1762 application:

    1. After a new record is added to the grid, the datefield editor works as expected.
    2. After the record is saved to the database and the page is reloaded, the datefield editor is blank.


    As far as I can tell, the dates are not correctly persisted to/retrieved from the database. Is there a possibility they are stored as a string? If not, can you post a sample date value from your database?
  10. #10
    The table definition is
    	[ActivityId] [int] IDENTITY(1,1) NOT NULL,
    	[OwnerId] [int] NULL,
    	[CreatedBy] [int] NULL,
    	[ActivityTypeCode] [int] NULL,
    	[AccountId] [int] NULL,
    	[GroupId] [uniqueidentifier] NULL,
    	[Subject] [nvarchar](200) NULL,
    	[Description] [nvarchar](max) NULL,
    	[StateCode] [int] NULL,
    	[ScheduledStart] [datetime] NULL,
    	[ScheduledEnd] [datetime] NULL,
    	[ActualStart] [datetime] NULL,
    	[ActualEnd] [datetime] NULL,
    	[Closed] [bit] NOT NULL CONSTRAINT [DF_Activity_Closed]  DEFAULT ((0)),
    To retrieve data I do use the SqlClient.SqlDataAdapter built in the DataSet's DataTable.
    DataColumns are so defined (I did select the only 4 columns of DateTime Type:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
      <xs:annotation>
        <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
          <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
            <ConnectionRefs>
              <DesignConnectionRef Name="bbCRMConnectionString (Web.config)" />
            </ConnectionRefs>
            <Connections>
              <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="bbCRMConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="bbCRMConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.bbCRMConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
            </Connections>
            <TableRefs>
              <DesignTableRef Name="Activity">
                <ColumnRefs>
                  <DesignColumnRef Name="ScheduledStart" />
                  <DesignColumnRef Name="ScheduledEnd" />
                  <DesignColumnRef Name="ActualStart" />
                  <DesignColumnRef Name="ActualEnd" />
                </ColumnRefs>
                <SourceRefs />
              </DesignTableRef>
            </TableRefs>
            <Tables>
              <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ActivityTableAdapter" GeneratorDataComponentClassName="ActivityTableAdapter" Name="Activity" UserDataComponentName="ActivityTableAdapter">
                <MainSource>
                  <DbSource ConnectionRef="bbCRMConnectionString (Web.config)" DbObjectName="bbCRM.dbo.Activity" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                    <DeleteCommand>
                      <DbCommand CommandType="Text" ModifiedByUser="false">
                        <CommandText>DELETE FROM [Activity] WHERE (([ActivityId] = @Original_ActivityId))</CommandText>
                        <Parameters>
                          <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ActivityId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ActivityId" SourceColumnNullMapping="false" SourceVersion="Original" />
                        </Parameters>
                      </DbCommand>
                    </DeleteCommand>
                    <InsertCommand>
                      <DbCommand CommandType="Text" ModifiedByUser="false">
                        <CommandText>INSERT INTO [Activity] ([OwnerId], [CreatedBy], [ActivityTypeCode], [AccountId], [GroupId], [Subject], [Description], [StateCode], [ScheduledStart], [ScheduledEnd], [ActualStart], [ActualEnd], [Closed]) VALUES (@OwnerId, @CreatedBy, @ActivityTypeCode, @AccountId, @GroupId, @Subject, @Description, @StateCode, @ScheduledStart, @ScheduledEnd, @ActualStart, @ActualEnd, @Closed);
    SELECT ActivityId, OwnerId, CreatedBy, ActivityTypeCode, AccountId, GroupId, Subject, Description, StateCode, ScheduledStart, ScheduledEnd, ActualStart, ActualEnd, Closed FROM Activity WHERE (ActivityId = SCOPE_IDENTITY())</CommandText>
                        <Parameters>
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@OwnerId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CreatedBy" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CreatedBy" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ActivityTypeCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ActivityTypeCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AccountId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AccountId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@GroupId" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="GroupId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Subject" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Subject" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@StateCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="StateCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ScheduledStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ScheduledStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ScheduledEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ScheduledEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ActualStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ActualStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ActualEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ActualEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Closed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Closed" SourceColumnNullMapping="false" SourceVersion="Current" />
                        </Parameters>
                      </DbCommand>
                    </InsertCommand>
                    <SelectCommand>
                      <DbCommand CommandType="Text" ModifiedByUser="false">
                        <CommandText>SELECT        ActivityId, OwnerId, CreatedBy, ActivityTypeCode, AccountId, GroupId, Subject, Description, StateCode, ScheduledStart, ScheduledEnd, ActualStart, ActualEnd, Closed
    FROM            Activity</CommandText>
                        <Parameters />
                      </DbCommand>
                    </SelectCommand>
                    <UpdateCommand>
                      <DbCommand CommandType="Text" ModifiedByUser="false">
                        <CommandText>UPDATE [Activity] SET [OwnerId] = @OwnerId, [CreatedBy] = @CreatedBy, [ActivityTypeCode] = @ActivityTypeCode, [AccountId] = @AccountId, [GroupId] = @GroupId, [Subject] = @Subject, [Description] = @Description, [StateCode] = @StateCode, [ScheduledStart] = @ScheduledStart, [ScheduledEnd] = @ScheduledEnd, [ActualStart] = @ActualStart, [ActualEnd] = @ActualEnd, [Closed] = @Closed WHERE (([ActivityId] = @Original_ActivityId));
    SELECT ActivityId, OwnerId, CreatedBy, ActivityTypeCode, AccountId, GroupId, Subject, Description, StateCode, ScheduledStart, ScheduledEnd, ActualStart, ActualEnd, Closed FROM Activity WHERE (ActivityId = @ActivityId)</CommandText>
                        <Parameters>
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@OwnerId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OwnerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CreatedBy" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CreatedBy" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ActivityTypeCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ActivityTypeCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@AccountId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AccountId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@GroupId" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="GroupId" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Subject" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Subject" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@StateCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="StateCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ScheduledStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ScheduledStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ScheduledEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ScheduledEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ActualStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ActualStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ActualEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ActualEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Closed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Closed" SourceColumnNullMapping="false" SourceVersion="Current" />
                          <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ActivityId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ActivityId" SourceColumnNullMapping="false" SourceVersion="Original" />
                          <Parameter AllowDbNull="false" AutogeneratedName="ActivityId" ColumnName="ActivityId" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ActivityId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ActivityId" SourceColumnNullMapping="false" SourceVersion="Current" />
                        </Parameters>
                      </DbCommand>
                    </UpdateCommand>
                  </DbSource>
                </MainSource>
                <Mappings>
                  <Mapping SourceColumn="ScheduledStart" DataSetColumn="ScheduledStart" />
                  <Mapping SourceColumn="ScheduledEnd" DataSetColumn="ScheduledEnd" />
                  <Mapping SourceColumn="ActualStart" DataSetColumn="ActualStart" />
                  <Mapping SourceColumn="ActualEnd" DataSetColumn="ActualEnd" />
                </Mappings>
                <Sources />
              </TableAdapter>
            </Tables>
            <RelationRefs />
            <SourceRefs />
            <Sources />
          </DataSource>
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="NewDataSet" msprop:Generator_DataSetName="NewDataSet">
        <xs:complexType>
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="Activity" msprop:Generator_TableClassName="ActivityDataTable" msprop:Generator_TableVarName="tableActivity" msprop:Generator_TablePropName="Activity" msprop:Generator_RowDeletingName="ActivityRowDeleting" msprop:Generator_RowChangingName="ActivityRowChanging" msprop:Generator_RowEvHandlerName="ActivityRowChangeEventHandler" msprop:Generator_RowDeletedName="ActivityRowDeleted" msprop:Generator_UserTableName="Activity" msprop:Generator_RowChangedName="ActivityRowChanged" msprop:Generator_RowEvArgName="ActivityRowChangeEvent" msprop:Generator_RowClassName="ActivityRow">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ScheduledStart" msdata:Caption="Inizio previsto" msprop:Generator_ColumnVarNameInTable="columnScheduledStart" msprop:Generator_ColumnPropNameInRow="ScheduledStart" msprop:Generator_ColumnPropNameInTable="ScheduledStartColumn" msprop:Generator_UserColumnName="ScheduledStart" type="xs:dateTime" minOccurs="0" />
                  <xs:element name="ScheduledEnd" msdata:Caption="Fine prevista" msprop:Generator_ColumnVarNameInTable="columnScheduledEnd" msprop:Generator_ColumnPropNameInRow="ScheduledEnd" msprop:Generator_ColumnPropNameInTable="ScheduledEndColumn" msprop:Generator_UserColumnName="ScheduledEnd" type="xs:dateTime" minOccurs="0" />
                  <xs:element name="ActualStart" msdata:Caption="Inizio" msprop:Generator_ColumnVarNameInTable="columnActualStart" msprop:Generator_ColumnPropNameInRow="ActualStart" msprop:Generator_ColumnPropNameInTable="ActualStartColumn" msprop:Generator_UserColumnName="ActualStart" type="xs:dateTime" minOccurs="0" />
                  <xs:element name="ActualEnd" msdata:Caption="Fine" msprop:Generator_ColumnVarNameInTable="columnActualEnd" msprop:Generator_ColumnPropNameInRow="ActualEnd" msprop:Generator_ColumnPropNameInTable="ActualEndColumn" msprop:Generator_UserColumnName="ActualEnd" type="xs:dateTime" minOccurs="0" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:choice>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    I set the DataSource in this way:
            Dim aTbl As CRMDataSet.ActivityDataTable = SiteMaster.TableAdapter.Activity.GetDataByFk(AccountId)
            sender.Store(0).DataSource = aTbl
            sender.Store(0).DataBind()
    GetDataByFk command text is
    SELECT        ActivityId, OwnerId, CreatedBy, ActivityTypeCode, AccountId, GroupId, Subject, Description, StateCode, ScheduledStart, ScheduledEnd, ActualStart, ActualEnd, Closed
    FROM            Activity
    WHERE AccountId=@AccountId
    ORDER BY ScheduledStart DESC, ActualStart DESC
Page 1 of 2 12 LastLast

Similar Threads

  1. Datetime parsing in chrome
    By Zdenek in forum 2.x Help
    Replies: 1
    Last Post: Nov 09, 2014, 6:51 AM
  2. [FIXED] DirectEvent response xml parsing
    By r_honey in forum Bugs
    Replies: 2
    Last Post: May 07, 2011, 9:24 AM
  3. [CLOSED] IE8: HTML Parsing Error
    By jsdeveloper in forum 1.x Legacy Premium Help
    Replies: 21
    Last Post: Feb 22, 2011, 1:36 PM
  4. [CLOSED] Problems with DateField
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 15, 2010, 3:18 PM
  5. [CLOSED] ExtraParams on a ajax event. Problems with parsing data.
    By Riset in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 09, 2009, 9:21 AM

Posting Permissions