私のプロジェクトでは、カレンダーを表示するDateEditがあります。
pickerGroup.Items.Add(item => Model.Start, itemSettings =>
{
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.DateEdit;
var dateEditSettings = (DateEditSettings)itemSettings.NestedExtensionSettings;
dateEditSettings.Properties.CalendarProperties.Columns = 2;
dateEditSettings.Properties.CalendarProperties.Rows = 1;
});
私の目標は、ウィンドウ幅が<XXの場合にこれら2つのプロパティを変更することです
私はJavaScript関数では次のように考えていました。
function Responsive() {
var width = screen.width;
if (width < 1000) {
settings.Properties.CalendarProperties.Columns = 1;
settings.Properties.CalendarProperties.Rows = 2;
}
else {
}
}
出来ますか?どんな援助でも大いに償われるでしょう。
ありがとうございました
回答:
回答№1は0私はDevexpress開発チームと連絡を取ることができました、そして私自身の質問に答えるために、いいえ、それは不可能です。
彼らの答えは:
DateEdit does not provide the capability to change the Columns property on the client side. As a workaround I suggest you use @media CSS rules. For example:
@@media screen and (max-width: 1000px) {
.dxeCalendar_DevEx td {
display: block;
}
.dxeCalendar_DevEx td td {
display: table-cell;
}
}
Note that it is necessary to set the current theme name instead of the "_DevEx" postfix. Should you have any further questions, feel free to contact us.