简体   繁体   English

在Windows应用程序的一个datagridview单元中绘制两个控件?

[英]Ploting two controls in one datagridview cell in windows application?

On the datagridview cellclick event i have ploted two controls,one is a combobox that displays weekdays and other is a datetimepicker control. 在datagridview cellclick事件上,我绘制了两个控件,一个是显示工作日的组合框,另一个是datetimepicker控件。 By default both the controls are left aligned hence i am not able to view the date inside datetimepicker control. 默认情况下,两个控件都保持对齐,因此我无法在datetimepicker控件中查看日期。 Hence i changed the property of datetimepicker control to: 因此,我将datetimepicker控件的属性更改为:

 dtPickerForFolder.DropDownAlign = LeftRightAlignment.Right;

But the problem is if i set this property i am able to see the date inside datetimepicker control in this format: PM02:57:12.That is in a reverse format. 但是问题是如果我设置了此属性,我可以使用以下格式在datetimepicker控件中查看日期:PM02:57:12。这是相反的格式。

How to solve this issue? 如何解决这个问题?

I am not very good in WinForms, but probably you should add two controls in some container. 我在WinForms中不是很好,但是可能应该在某个容器中添加两个控件。 In WPF it could be StackPanel or something. 在WPF中,它可能是StackPanel或其他东西。 I think WinForms has something similar 我认为WinForms有类似的东西

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何动态地在C#windows应用程序中的DataGridView单元格中添加表? - How to add a Table in a cell of DataGridView in C# windows application dynamically? 在c#windows应用程序的datagridview单元中突出显示特定的文本 - Highlight the particular text inside a datagridview cell in c#windows application Windows窗体应用程序中两个用户控件之间的交互 - Interaction between two user controls in windows form application 一个dataGridView中有两个实体 - Two entities in one dataGridView 对于使用“ DataGridView”的Windows窗体应用程序,如何检查数据源中的值并更改单独单元格的颜色? - For a Windows Forms Application using `DataGridView`, how can I check a value in my DataSource and change the color of a separate cell? 在Windows窗体中使用SpellCheck…是否可以将其中一个绑定到datagridview文本单元格? - using SpellCheck with Windows Forms … is it possible to rig one up to a datagridview text cell? Windows应用程序中DataGridView中的货币格式 - Currency format in DataGridView in windows application 在Windows窗体应用程序中重复控件 - Repeating controls in windows form application datagridview单元格在Windows窗体中编辑和保存功能? - datagridview cell edit and save functionality in windows forms? 比较两个dataGridView单元格与日期值? - compare two dataGridView cell with date value?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM