Welcome Guest Search | Active Topics | Sign In | Register

Set PickerFormat in DateTimeColumn Options
Philipp Jenni
Posted: Monday, September 19, 2011 12:57:24 PM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2007
Posts: 98
Hi,

How i can set the format of the DateTimerColumn in the edit mode. I have follow asp.net code

Code: HTML/ASPX
<eo:DateTimeColumn DataField="bisdatum" DataFormat="{0:dd.MM.yyyy HH:mm}" DataType="DateTime" HeaderText="Bis"
                            MaxWidth="120" Width="120">
                            <eo:DatePicker runat="server" AllowMultiSelect="False" ControlSkinID="None" DayCellHeight="15"
                                DayCellWidth="31" DayHeaderFormat="Short" DisabledDates="" OtherMonthDayVisible="True"
                                PickerFormat="dd.MM.yyyy HH:mm" SelectedDates="" TitleFormat="MMMM, yyyy" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
                                TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2009-08-01" TabIndex="9" Width="180px">
                                <TodayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040401');color:#1176db;" />
                                <SelectedDayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040403');color:Brown;" />
                                <DisabledDayStyle CssText="font-family:Verdana;font-size:8pt;color: gray" />
                                <FooterTemplate>
                                    <table border="0" cellpadding="0" cellspacing="5" style="font-size: 11px; font-family: Verdana">
                                        <tr>
                                            <td width="30">
                                            </td>
                                            <td valign="center">
                                                <img src="{img:00040401}"></img>
                                            </td>
                                            <td valign="center">
                                                Heute: {var:today:MM/dd/yyyy}
                                            </td>
                                        </tr>
                                    </table>
                                </FooterTemplate>
                                <CalendarStyle CssText="background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <TitleArrowStyle CssText="cursor: hand" />
                                <DayHoverStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040402');color:#1c7cdc;" />
                                <MonthStyle CssText="cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px;" />
                                <TitleStyle CssText="font-family:Verdana;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <DayHeaderStyle CssText="font-family:Verdana;font-size:8pt;border-bottom: #f5f5f5 1px solid" />
                                <DayStyle CssText="font-family:Verdana;font-size:8pt;" />
                            </eo:DatePicker>
                        </eo:DateTimeColumn>

I set the format in the DateFormat property an this works fine for the viewing mode. But in the edit mode of the cell, there is the default format "MM/dd/yyyy"

Can you help me
eo_support
Posted: Monday, September 19, 2011 3:41:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please try to set it inside ColumnTemplates, not inside Columns. When the DatePicker is defined inside ColumnTemplates, the Grid always copy values from there.

Thanks!
Philipp Jenni
Posted: Monday, September 19, 2011 3:49:45 PM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2007
Posts: 98
Hi,

I have test it. But it doesnt work. Here my full control config:

Code: HTML/ASPX
<eo:Grid ID="gridMannschaftSperrDaten" runat="server" BorderColor="#828790" BorderWidth="1px"
                    ColumnHeaderAscImage="00050204" ColumnHeaderDescImage="00050205" ColumnHeaderDividerImage="00050203"
                    ColumnHeaderHeight="24" FixedColumnCount="1" Font-Bold="False" Font-Italic="False"
                    Font-Names="Tahoma" Font-Overline="False" Font-Size="8.75pt" Font-Strikeout="False"
                    Font-Underline="False" FullRowMode="False" GridLineColor="240, 240, 240" GridLines="Both"
                    Height="370px" ItemHeight="19" KeyField="id" Width="700px" AllowNewItem="True"
                    OnItemAdded="gridMannschaftSperrDaten_ItemAdded" OnItemChanged="gridMannschaftSperrDaten_ItemChanged"
                    OnItemDeleted="gridMannschaftSperrDaten_ItemDeleted">
                    <ItemStyles>
                        <eo:GridItemStyleSet>
                            <ItemStyle CssText="background-color: white" />
                            <ItemHoverStyle CssText="background-image: url(00050206); background-repeat: repeat-x" />
                            <SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" />
                            <CellStyle CssText="padding-left:8px;padding-top:2px;white-space:nowrap;" />
                        </eo:GridItemStyleSet>
                    </ItemStyles>
                    <ColumnHeaderStyle CssText="background-image:url('00050201');padding-left:8px;padding-top:4px;" />
                    <ColumnHeaderHoverStyle CssText="background-image:url('00050202');padding-left:8px;padding-top:4px;" />
                    <Columns>
                        <eo:RowNumberColumn DataField="id" HeaderText="ID" MaxWidth="50" Width="50">
                        </eo:RowNumberColumn>
                        <eo:DateTimeColumn DataField="vondatum" DataFormat="{0:dd.MM.yyyy HH:mm}" HeaderText="Von"
                            MaxWidth="120" Width="120">
                            <eo:DatePicker runat="server" AllowMultiSelect="False" ControlSkinID="None" DayCellHeight="15"
                                DayCellWidth="31" DayHeaderFormat="Short" DisabledDates="" OtherMonthDayVisible="True"
                                PickerFormat="dd.MM.yyyy HH:mm" SelectedDates="" TitleFormat="MMMM, yyyy" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
                                TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2009-08-01" TabIndex="9">
                                <TodayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040401');color:#1176db;" />
                                <SelectedDayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040403');color:Brown;" />
                                <DisabledDayStyle CssText="font-family:Verdana;font-size:8pt;color: gray" />
                                <FooterTemplate>
                                    <table border="0" cellpadding="0" cellspacing="5" style="font-size: 11px; font-family: Verdana">
                                        <tr>
                                            <td width="30">
                                            </td>
                                            <td valign="center">
                                                <img src="{img:00040401}"></img>
                                            </td>
                                            <td valign="center">
                                                Heute: {var:today:MM/dd/yyyy}
                                            </td>
                                        </tr>
                                    </table>
                                </FooterTemplate>
                                <CalendarStyle CssText="background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <TitleArrowStyle CssText="cursor: hand" />
                                <DayHoverStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040402');color:#1c7cdc;" />
                                <MonthStyle CssText="cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px;" />
                                <TitleStyle CssText="font-family:Verdana;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <DayHeaderStyle CssText="font-family:Verdana;font-size:8pt;border-bottom: #f5f5f5 1px solid" />
                                <DayStyle CssText="font-family:Verdana;font-size:8pt;" />
                            </eo:DatePicker>
                        </eo:DateTimeColumn>
                        <eo:DateTimeColumn DataField="bisdatum" DataFormat="{0:dd.MM.yyyy HH:mm}" DataType="DateTime"
                            HeaderText="Bis" MaxWidth="120" Width="120">
                            <eo:DatePicker runat="server" AllowMultiSelect="False" ControlSkinID="None" DayCellHeight="15"
                                DayCellWidth="31" DayHeaderFormat="Short" DisabledDates="" OtherMonthDayVisible="True"
                                PickerFormat="dd.MM.yyyy HH:mm" SelectedDates="" TitleFormat="MMMM, yyyy" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
                                TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2009-08-01" TabIndex="9"
                                Width="180px">
                                <TodayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040401');color:#1176db;" />
                                <SelectedDayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040403');color:Brown;" />
                                <DisabledDayStyle CssText="font-family:Verdana;font-size:8pt;color: gray" />
                                <FooterTemplate>
                                    <table border="0" cellpadding="0" cellspacing="5" style="font-size: 11px; font-family: Verdana">
                                        <tr>
                                            <td width="30">
                                            </td>
                                            <td valign="center">
                                                <img src="{img:00040401}"></img>
                                            </td>
                                            <td valign="center">
                                                Heute: {var:today:MM/dd/yyyy}
                                            </td>
                                        </tr>
                                    </table>
                                </FooterTemplate>
                                <CalendarStyle CssText="background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <TitleArrowStyle CssText="cursor: hand" />
                                <DayHoverStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040402');color:#1c7cdc;" />
                                <MonthStyle CssText="cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px;" />
                                <TitleStyle CssText="font-family:Verdana;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <DayHeaderStyle CssText="font-family:Verdana;font-size:8pt;border-bottom: #f5f5f5 1px solid" />
                                <DayStyle CssText="font-family:Verdana;font-size:8pt;" />
                            </eo:DatePicker>
                        </eo:DateTimeColumn>
                        <eo:TextBoxColumn DataField="grund" HeaderText="Grund" MaxWidth="350" Width="350">
                        </eo:TextBoxColumn>
                        <eo:DeleteCommandColumn DataField="id" DeleteText="Löschen" Width="60">
                        </eo:DeleteCommandColumn>
                    </Columns>
                    <ColumnTemplates>
                        <eo:DateTimeColumn>
                            <eo:DatePicker ID="DatePicker1" runat="server" AllowMultiSelect="False" ControlSkinID="None"
                                DayCellHeight="15" DayCellWidth="31" DayHeaderFormat="Short" DisabledDates=""
                                OtherMonthDayVisible="True" PickerFormat="dd.MM.yyyy HH:mm" SelectedDates=""
                                TitleFormat="MMMM, yyyy" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL" TitleRightArrowImageUrl="DefaultSubMenuIcon"
                                VisibleDate="2009-08-01" TabIndex="9">
                                <TodayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040401');color:#1176db;" />
                                <SelectedDayStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040403');color:Brown;" />
                                <DisabledDayStyle CssText="font-family:Verdana;font-size:8pt;color: gray" />
                                <FooterTemplate>
                                    <table border="0" cellpadding="0" cellspacing="5" style="font-size: 11px; font-family: Verdana">
                                        <tr>
                                            <td width="30">
                                            </td>
                                            <td valign="center">
                                                <img src="{img:00040401}"></img>
                                            </td>
                                            <td valign="center">
                                                Heute: {var:today:MM/dd/yyyy}
                                            </td>
                                        </tr>
                                    </table>
                                </FooterTemplate>
                                <CalendarStyle CssText="background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <TitleArrowStyle CssText="cursor: hand" />
                                <DayHoverStyle CssText="font-family:Verdana;font-size:8pt;background-image:url('00040402');color:#1c7cdc;" />
                                <MonthStyle CssText="cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px;" />
                                <TitleStyle CssText="font-family:Verdana;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px;" />
                                <DayHeaderStyle CssText="font-family:Verdana;font-size:8pt;border-bottom: #f5f5f5 1px solid" />
                                <DayStyle CssText="font-family:Verdana;font-size:8pt;" />
                            </eo:DatePicker>
                        </eo:DateTimeColumn>
                    </ColumnTemplates>
                    <FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
                </eo:Grid>
eo_support
Posted: Tuesday, September 20, 2011 5:08:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The DatePicker inside the DateTimeColumn should be DatePicker instead of "eo:DatePicker". For example, this is correct:

Code: HTML/ASPX
<eo:DateTimeColumn ....>
    <DatePicker .....>
        ....
    </DatePicker>
</eo:DateTimeColumn>


This is wrong:
Code: HTML/ASPX
<eo:DateTimeColumn ....>
    <eo:DatePicker .....>
        ....
    </eo:DatePicker>
</eo:DateTimeColumn>


Hope this helps.

Thanks
Philipp Jenni
Posted: Monday, September 26, 2011 7:38:07 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2007
Posts: 98
It works.

Thank you...


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.