iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
Can anyone please let me know how we can create a Column in the web grid which can have date and time selection.
I have a column of DateTime type and I set the
MyColumn.EditType = EditType.CalendarCombo;
MyColumn.DataFormatString = "MM/dd/yyyy HH:MM";
however this does not give the Time selection option.
Please anyone can suggest how to achive this simple problem.
Thanks,
Ravinder
You can try to integrate WebInput control as WebGrid custom editor control. By using WebInput as the custom editor, we can create a column in WebGrid with date and time editor.
This sample: IntegrationwithWebInput.NET.aspx (the live version can be accessed from here) shows how to integrate Intersoft's WebInput.NET as EditType of a WebGridColumn.
I modified the sample so that the WebInput editor for for "OrderDate" column looks like below:
<ISWebInput:WebInput ID="WebInput1" runat="server"> <HighLight IsEnabled="True" Type="Phrase" /> <CultureInfo CultureName="en-US"> </CultureInfo> <EditFormat Format="MM/dd/yyyy HH:mm" IsEnabled="True"> <MaskInfo MaskExpression="00/00/0000 00:00"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> <DateTimeEditor IsEnabled="True"> </DateTimeEditor> <DisplayFormat Format="MM/dd/yyyy HH:mm" IsEnabled="True"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> </ISWebInput:WebInput>
After apply and save the changes, now I can display and edit the "OrderDate" column with following format string: MM/dd/yyyy HH:mm.
Hope this helps.
Thanks Yudi. We really appreciate your response on this.
I have put the abvoe implementation in my code. Now, I can see the calender control on click of my grid column cell. However, I am only getting dates selection. I do not get the Time selection in the control.
Please let me know which other properties I would need to set in order to select 'Time' also.
Thanks
Thank you for contacting us through our chat service.
ASPNET-186 has been submitted to WebGrid development team as feature request, to have WebGrid's built-in editor with date and time selection. The team will check the feasibility to implement this feature in the next build of WebGrid. I'll keep this updated with any news I heard from the team regarding ASPNET-186.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname