Unable to enter data when GridViewDataColumn is in edit mode

4 posts, 0 answers
  1. Hasanain
    Hasanain avatar
    8 posts
    Member since:
    Jun 2012

    Posted 02 Aug 2012 Link to this post

    Hello,

    I have set up an editable column, with separate templates for view and edit defined.

    <telerik:GridViewDataColumn Name="TargetPercentOfAccountMarketValue" Header="% Of Total"  
     Width="75" HeaderCellStyle="{StaticResource columnHeaderStyle}"                                            
    CellStyle="{StaticResource whatIfCell}"
                                                
    DisplayIndex="8" EditTriggers="CellClick,TextInput"
                                                
    IsReadOnlyBinding="{Binding NodeType, Converter={StaticResource nodeTypeToIsReadOnlyConverter}}"
                                                
    ColumnGroupName="WhatIfAllocation">
                        
    <
    telerik:GridViewDataColumn.CellTemplate>                        
    <
    DataTemplate>                            
    <
    TextBlock Text="{Binding Node.TargetPercentOfAccountMarketValue, StringFormat={}{0:P1}}"                                       
    Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}, UpdateSourceTrigger=PropertyChanged}">
                                
    </
    TextBlock>                       
    </
    DataTemplate>                    
    </
    telerik:GridViewDataColumn.CellTemplate>                    
    <
    telerik:GridViewDataColumn.CellEditTemplate>                        
    <
    DataTemplate>                            
    <
    TextBox BorderBrush="Transparent" BorderThickness="1"
    Text="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource StringToPercentageConverter}, StringFormat={}{0:N2}}"  Background="Transparent"                                     
    Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}}"/><
    br>                       
    </
    DataTemplate>                  
    </
    telerik:GridViewDataColumn.CellEditTemplate>                
    </
    telerik:GridViewDataColumn>

    The reason for the two separate templates is that I need the values formatted differently for viewing and editing.
    I can enter into edit mode, i.e. I see the blinking cursor, but I cannot enter any values; backspace works strangely enough, so I can delete any existing value but when I try and enter it fails.

    I'd like to know what is wrong with a column setup in this manner.

    Thank You

    Hasanain

  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 03 Aug 2012 Link to this post

    Hello Hasanain,

     
    Unfortunately, I was not able to reproduce the problem. May I ask you to share more details about how you have defined your objects and the converters? A code-snippet or a sample project demonstrating the issue would be of much help.


    Looking forward to hearing from you. 

    Kind regards,
    Vera
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Hasanain
    Hasanain avatar
    8 posts
    Member since:
    Jun 2012

    Posted 03 Aug 2012 Link to this post

    The problem appears to be very flaky. I can enter some text/numbers into the box initially, when everything works perfectly. But after that initial burst of activity, if I stop and come back to that same screen, then it stops working; At that point it can take in only spaces, and I can delete any value present using backspace or delete keys.

    I currently have a trial version, could that be the reason. 

    I have a sample project, but it's strange that it works fine there. When I have it replicated in that project, I will send it across.

    For GridViewDataColumn and GridViewMaskedTextBoxColumn: Is there an overlay on the cell that the column provides and the cell edit template(s) is "below" that? And is there any preview text event that is caught to do the validation when an input is made?

    Thank You

    Hasanain
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 06 Aug 2012 Link to this post

    Hi,

     Our trials are exactly the same as our dev versions. If you can send us an example application where we can reproduce the problem we will be able to provide more info what's going on.

    All the best,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top