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,
I am trying to implement WebInput into a Webgrid column. The WebInput is DateTime type. Now, I have some dat in the grid which is already filled and the DateTime column is also filled with existing date/time value. Now,if I click on the cell to change/select/edit the datetime value, webinput always show me the current date.However, we want webinput to show the datetime value which is already present in my grid cell as selected.
I used the client side SetValueData method of webinput and it is working fine in case provided only date and not the Time. If my webinput has both Date and Time then the webinput is not showing the date which I passed in the SetValueData() method and just shows the today date.
Please intersoft guys, this is very urgent, your quick response on this will be very much appreciated.
Thanks,
Ravinder
I got the solution working for my scenario. I thought it would be good for all to share the solution.
I Used the webGrid client side event : OnEnterEditMode; to set the value for the webinput control. e.g
WebInput1.SetValueData(CompleteDateTimeToSelect);
Note that CompleteDateTimeToSelect variable should have the same format as used in the MaskExpression.
In addition to this, I found that when I was trying to use the <DisplayFormat></DisplayFormat> tag then the datetime value in the webinput was not working. So , i tried removing DispalyFormat tag and it worked.
Here is code for webinput:
<ISWebInput:WebInput ClientSideEvents-OnBlur="WebInput1_OnBlur" ID="WebInput1" runat="server">
<HighLight IsEnabled="True" Type="Phrase" />
<EditFormat Type="DateTime" Format="MM/dd/yyyy HH:mm" IsEnabled="true">
<MaskInfo MaskExpression="00/00/0000 00:00">
</MaskInfo>
<ErrorWindowInfo IsEnabled="False">
</ErrorWindowInfo>
</EditFormat>
<DateTimeEditor IsEnabled ="true"></DateTimeEditor>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
Now, to get back the date selected by the user and to set in the webinput, I Used the following client side events.
WebInputs : OnBlur event and WebGrid's OnExitEditMode event.
Hope will help if someone have kind of same problem/case
Thank you for taking the time to share the solution with us. I'm sure your post will help other members that have similar problem/case.
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