|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
<eo:MaskedEditColumn HeaderText="In-Punch"> <MaskedEdit runat="server" ControlSkinID="None" PromptChar="0"> <eo:MaskedEditSegment MaxValue="24" SegmentType="Number" Text="00" /> <eo:MaskedEditSegment Text=":" /> <eo:MaskedEditSegment MaxValue="59" SegmentType="Number" Text="00" /> <eo:MaskedEditSegment Choices="a|p|A|P| " SegmentType="Choice" Text=" " /> </MaskedEdit> </eo:MaskedEditColumn> I use this code to enter time 07:00a. Works great on normal maskededit control. But in Grid, MaskedEdit does not seem to use the PromptChar. So 07:00a shows as _7:_0a. any thoughts?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
This appears to be a bug. We are looking into it and will get back to you as soon as possible.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
does this mean i wont be a "newbie" anymore? :)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You never were. : ) The forum automatically rank you as "newbie" based on the number of posts you made. The more you post, the higher the rank. However most people post in the forum when they have a question and people who have the most questions are usually (understandably) the least experienced.....so really the newbie rank should be measured the other way around. : )
Thanks
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
eo_support wrote:This appears to be a bug. We are looking into it and will get back to you as soon as possible. I'm having the same problems... We're using the MaskEdit for a timesheet grid (i.e. 00:00 to 23:45 by 15 minute intervals): <eo:MaskedEdit ID="MaskedEdit1" runat="server" ControlSkinID="None" PromptChar="0"> <eo:MaskedEditSegment IsRequired="True" MaxValue="23" SegmentType="Number" Mask="00" /> <eo:MaskedEditSegment Text=":" IsRequired="True" /> <eo:MaskedEditSegment Choices="00|15|30|45" Mask="00" SegmentType="Choice" IsRequired="True" /> </eo:MaskedEdit> Same symptoms as mentioned ealier a standalone mask edit works perfectly but in a grid it produces unacceptable strings (i.e. ":00" & "7:15")... Wait! This works better: <eo:MaskedEdit ID="MaskedEdit2" runat="server" ControlSkinID="None" PromptChar="0"> <eo:MaskedEditSegment Choices="" Mask="0" SegmentType="Number" IsRequired="True" MaxValue="2" /> <eo:MaskedEditSegment Choices="" Mask="0" SegmentType="Number" IsRequired="True" MaxValue="9" /> <eo:MaskedEditSegment Text=":" IsRequired="True" /> <eo:MaskedEditSegment Choices="00|15|30|45" Mask="00" SegmentType="Choice" IsRequired="True" /> </eo:MaskedEdit> The only problem would be to stop the second segment to 3 if the first segment is 2 (i.e. has to stay below 24:00). This will probably work with a ClientSideOnChange method validation. I'll try that out next. Another thing I noticed is the the arrow keys in this standalone mask edit acts like a "NumericalUpDown" for each segment, which is a cool feature... This doesn't work well at all in the grid (i.e. does one inc/de-crementation and skips to the next row). Do you have a suggestion to bypass these problems? Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please try to delete the MaskedEditColumn from the Grid's ColumnTemplate collection. That will partially correct the PromptChar="0" issue for you. It may still give you invalid strings such as ":00". To correct that issue, you will want to handle the GridColumn's ClientSideEndEdit handler. Inside that handler you can reformat the string to its "acceptable" format and then return the formatted string to the Grid.
As for the arrow key up/down issue, the only way to avoid that problem is to turn EnableKeyboardNavigation off on the Grid. Once EnableKeyboardNavigation is turned off on the Grid, it will no longer try to intercept arrow keys thus leaving the arrow keys to the MaskedEdit.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
eo_support wrote:Please try to delete the MaskedEditColumn from the Grid's ColumnTemplate collection. That will partially correct the PromptChar="0" issue for you. It may still give you invalid strings such as ":00". To correct that issue, you will want to handle the GridColumn's ClientSideEndEdit handler. Inside that handler you can reformat the string to its "acceptable" format and then return the formatted string to the Grid.
As for the arrow key up/down issue, the only way to avoid that problem is to turn EnableKeyboardNavigation off on the Grid. Once EnableKeyboardNavigation is turned off on the Grid, it will no longer try to intercept arrow keys thus leaving the arrow keys to the MaskedEdit. Thank you for the quick response! The first problem will be fixed like you said. But the second one is a little annoying. I get from the given solution that you can't have both (i.e. "NumericalUpDownMaskEdit" & "KeyNavigationEnabledGrid"). Now EnableKeyboardNavigation=False in the grid is not an option for us... So we would be able to live without the NumericalUpDown on the mask edit. Except, there doesn't seem to have a way of disabling the feature... MaskedEdit.EnableKeyboardNavigation=False seemed the logical solution but that doesn't seem to change anything. If this feature doesn't already exist it would be a nice one to have. Ideally what would be a cool approach would be a new property in the grid to go with EnableKeyboardNavigation, let's say "KeyboardNavigationMode={Standard,TabsOnly}". If you have KeyboardNavigationMode=Standard, you automatically deactivate ArrowKey support on the MaskEdit (i.e. KeyboardNavigationMode=Standard => MaskedEdit.EnableKeyboardNavigation=False). If you have KeyboardNavigationMode=TabsOnly, the only way to navigate in the grid is with the tab key. In this mode if you fall into a MaskedEdit Cell that should work like the standalone version with arrowkey support (i.e. NumericalUpDown). Ultimately, you could create your own ComboBoxColumn that would work well with this feature (i.e. like masked edit except that instead of NumericalUpDown you have ComboSelection) and bypass some of the little problems i have encountered using a CustomColumn/Select combination... But I digress... The question is: "Currently, how do you have a KeyboardNavigation Enabled Grid that works with Masked Edit?" Thanks Again!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Thanks for your excellent feedback. I am not sure if I understand your question correctly about Having EnabledKeyboardNavigation=False. My understanding is as long as you have the MaskedEdit in the Grid, the Grid will handle all the "navigation keys", thus makes it effectively as EnabledKeyboardNavigation=False in the MaskedEdit. Isn't this exactly what you had in mind?
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
eo_support wrote:I am not sure if I understand your question correctly about Having EnabledKeyboardNavigation=False. My understanding is as long as you have the MaskedEdit in the Grid, the Grid will handle all the "navigation keys", thus makes it effectively as EnabledKeyboardNavigation=False in the MaskedEdit. sclavette wrote: Another thing I noticed is the the arrow keys in this standalone mask edit acts like a "NumericalUpDown" for each segment, which is a cool feature... This doesn't work well at all in the grid (i.e. does one inc/de-crementation and skips to the next row).
Sorry for not being clear enough... What I meant is,for example if I am editing the cell and have put "03:00" as a correct value. If I click the down arrow, I either expect that it does the NumericalUpDown bit or goes down to the next line, not both at the same time... Currently, what it does is change "03:00" to "02:00" and goes to the next line.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
I see. I would categorize this as a bug. We will look into it and see if we can get you an update build to address this issue as soon as possible.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted a new build that should address this issue for you. Please see your private message for the download location.
In the new build as long as the focus is inside the MaskedEdit control, the MaskedEdit control will handle the up/down arrow, the Grid will not handle it. If user wants to move to another cell, he can hit tab or enter key to exit edit mode first, then he will be able to use arrow key to navigate to other cells.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
Thank You Very Much! I will test it out shortly but my first test looked very good! The only problem is that I upgraded to this version and my VS 2010 solution doesn't display any of your controls now. I can build it and execute but designing will be difficult. I uninstalled the older version 12.10 for this one (12.36). I changed the reference to EO.Web.dll to point on the new one. Rebuild doesn't fix it... Visually, all I see in the designer is "Error Creating Control – Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System. Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration" Now interestingly enough I just noticed one special fact... I lied when I said: Quote:doesn't display any of your controls I'm using Master/Content Pages and your Menu control is visible and without errors in the Master Page. Is there something I'm missing here? Thank you!
I have figured out what caused this problem for us. This was a coding error on our part. For those with similar problems using VS 2010 I suggest your look up these two articles from Microsoft: http://support.microsoft.com/kb/2024322http://blogs.msdn.com/b/webdev/archive/2010/04/15/rendering-issue-in-visual-studio-2010-when-accessing-the-session-state-in-the-oninit-method.aspx
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Great. Thank you very much for letting us know and sharing the link! Please feel free to let us know if you have any other questions.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
We've just tested it out and it very near perfection! We seem to have picked up another little bug...
Take the two following columns, and pop them into a KeyNavigationEnabled Grid: <Columns> <eo:MaskedEditColumn Name="De" HeaderText="De" DataType="String" DataField="De" DataFormat="" > <MaskedEdit ControlSkinID="None" PromptChar="0" > <eo:MaskedEditSegment IsRequired="True" MaxValue="23" SegmentType="Number" Mask="00" Text="00" /> <eo:MaskedEditSegment Text="h" IsRequired="True" /> <eo:MaskedEditSegment Choices="00|15|30|45" Mask="00" SegmentType="Choice" IsRequired="True" Text="00" /> </MaskedEdit> </eo:MaskedEditColumn> <eo:MaskedEditColumn Name="A" HeaderText="À" DataType="String" DataField="A" DataFormat="" > <MaskedEdit ControlSkinID="None" PromptChar="0" > <eo:MaskedEditSegment IsRequired="True" MaxValue="23" SegmentType="Number" Mask="00" Text="00" /> <eo:MaskedEditSegment Text="h" IsRequired="True" /> <eo:MaskedEditSegment Choices="00|15|30|45" Mask="00" SegmentType="Choice" IsRequired="True" Text="00" /> </MaskedEdit> </eo:MaskedEditColumn>Columns>
Here's what I did step-by-step: 1.Click on the first empty cell, "00:00" should appear and if your cursor was on the first segment the first 00 should be highlighted. 2.TypeIn 15 (shifts to second segment, 00 highlighted), 1 = "15h15" 3.<TAB><TAB> now you're at the same point as 1 but in the second cell 4.TypeIn 20 (shifts to second segment, 00 highlighted), 3= "20h30" 5.<LEFT ARROW><LEFT ARROW><LEFT ARROW>now you're exactly back to step 1 6.The idea is to change 15h15 to 16h15... TypeIn 1 and before can typein 6 you're on the second segment with "23:15".
Can you check this out?
Thanks you for the support!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please try to use del/backspace key to clear the segment before typing in "1". What you described is the ideal way but it requires more code changes than we feel comfortable with (as more changes means more risk of breaking other things). The way the MaskedEdit work now is, if the segment is empty, then you can type all the letters, however as long as its length reaches full length, it will jump to the next segment. So as long as you clear the contents first, it won't jump to the next segment.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/27/2012 Posts: 12
|
eo_support wrote:Please try to use del/backspace key to clear the segment before typing in "1". <DEL> works better than <BACKSPACE> which ends up giving you inconsistent mask values and losing cell focus... In any case, the customer won't mind pressing on a extra key in this case. Thank you for your time!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Thanks for understanding. We will keep this in mind when we work on our next release ---- maybe to change the MaskedEdit to automatically detect a "re-select" (losing focus, then select) scenario and if that has occurred, then automatically clears the segment on first key press.
Thanks!
|
|