Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
EditorControlID for time field
posted
Hi, I'm trying to use a webdatetimeedit control to enter a time (hh:mm) winthin a webgrid. entering works but after leaving the cell the time is set back to the value prior to the change. Date fields with webdatachooser work. Any sugesstions. thx frank
  • 28464
    posted

    Hello,

    That is weird - I tried to reproduce the same problem (using latest release - 2008.3) and was not able to - in my case everything worked as expected. Here is my setup and and a screenshot of what I am getting

        <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"
            DataSourceID="AccessDataSource1" Height="200px" Width="325px" >
            <Bands>
                <igtbl:UltraGridBand>
                    <Columns>
                        <igtbl:UltraGridColumn BaseColumnName="RequiredDate" DataType="System.DateTime"  Format="hh:mm"
                            IsBound="True" Key="RequiredDate" Type="Custom" EditorControlID="WebDateTimeEdit1">
                            <Header Caption="RequiredDate">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="ShippedDate" DataType="System.DateTime"
                            IsBound="True" Key="ShippedDate">
                            <Header Caption="ShippedDate">
                                <RowLayoutColumnInfo OriginX="1" />
                            </Header>
                            <Footer>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Footer>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="ShipName" IsBound="True" Key="ShipName">
                            <Header Caption="ShipName">
                                <RowLayoutColumnInfo OriginX="2" />
                            </Header>
                            <Footer>
                                <RowLayoutColumnInfo OriginX="2" />
                            </Footer>
                        </igtbl:UltraGridColumn>
                    </Columns>
                    <AddNewRow View="NotSet" Visible="NotSet">
                    </AddNewRow>
                </igtbl:UltraGridBand>
            </Bands>
            <DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer"
                AllowDeleteDefault="Yes" AllowSortingDefault="OnClient"
                AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"
                HeaderClickActionDefault="SortMulti" Name="UltraWebGrid1"
                RowHeightDefault="20px" RowSelectorsDefault="No"
                SelectTypeRowDefault="Extended" StationaryMargins="Header"
                StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="4.00"
                ViewType="OutlookGroupBy">
                <FrameStyle BackColor="Window" BorderColor="InactiveCaption"
                    BorderStyle="Solid" BorderWidth="1px" Font-Names="Microsoft Sans Serif"
                    Font-Size="8.25pt" Height="200px" Width="325px">
                </FrameStyle>
                <Pager MinimumPagesForDisplay="2">
                    <PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
                        WidthTop="1px" />
                    </PagerStyle>
                </Pager>
                <EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
                </EditCellStyleDefault>
                <FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
                        WidthTop="1px" />
                </FooterStyleDefault>
                <HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid"
                    HorizontalAlign="Left">
                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
                        WidthTop="1px" />
                </HeaderStyleDefault>
                <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid"
                    BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
                    <Padding Left="3px" />
                    <BorderDetails ColorLeft="Window" ColorTop="Window" />
                </RowStyleDefault>
                <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                </GroupByRowStyleDefault>
                <GroupByBox>
                    <BoxStyle BackColor="ActiveBorder" BorderColor="Window">
                    </BoxStyle>
                </GroupByBox>
                <AddNewBox Hidden="False">
                    <BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid"
                        BorderWidth="1px">
                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
                            WidthTop="1px" />
                    </BoxStyle>
                </AddNewBox>
                <ActivationObject BorderColor="" BorderWidth="">
                </ActivationObject>
                <FilterOptionsDefault>
                    <FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid"
                        BorderWidth="1px" CustomRules="overflow:auto;"
                        Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px" Height="300px"
                        Width="200px">
                        <Padding Left="2px" />
                    </FilterDropDownStyle>
                    <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
                    </FilterHighlightRowStyle>
                    <FilterOperandDropDownStyle BackColor="White" BorderColor="Silver"
                        BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;"
                        Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px">
                        <Padding Left="2px" />
                    </FilterOperandDropDownStyle>
                </FilterOptionsDefault>
            </DisplayLayout>
        </igtbl:UltraWebGrid>
          
       
        <asp:AccessDataSource ID="AccessDataSource1" runat="server"
            DataFile="~/App_Data/Nwind.mdb"
            SelectCommand="SELECT [RequiredDate], [ShippedDate], [ShipName] FROM [Invoices]">
        </asp:AccessDataSource>   
       
        <igtxt:WebDateTimeEdit ID="WebDateTimeEdit1" runat="server" EditModeFormat="hh:mm">

     

    Is there anything different in your setup?