This is a migrated thread and some comments may be shown as answers.
in using CellEditTemplate error
4 Answers 18 Views
This is a migrated thread and some comments may be shown as answers.
Park
Top achievements
Rank 1
Park asked on 16 Sep 2011, 03:47 AM
Hi

here RadGridView source

  <telerik:RadGridView Grid.Row="2" x:Name="rgvMain"
   MKERP_Infrastructures_ContextMenu:GridViewHeaderMenu.IsEnabled="True"
   AutoGenerateColumns="False"
   AlternationCount="2" ShowGroupPanel="False"
   ScrollViewer.VerticalScrollBarVisibility="Auto" RowIndicatorVisibility="Collapsed" Margin="0,28,0,0" ColumnWidth="*" ItemsSource="{Binding SsoOrdDtlSet.SsoOrdDtlCollection}">
   <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Header="제품코드" DataMemberBinding="{Binding IdStyle, Mode=Twoway}" Width="70" IsReadOnly="True"/>
    <telerik:GridViewDataColumn Header="컬러" DataMemberBinding="{Binding CbiColor.NM_COLOR}" Width="55" CellEditTemplate="{StaticResource ColorComboDataTemplate}"/>
    <telerik:GridViewDataColumn Header="TAG가격" DataMemberBinding="{Binding TagPrice, StringFormat=N0}" TextAlignment="Right" Width="65" IsReadOnly="True"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S210Low}" Header="이하" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B210Low}" CellEditTemplate="{StaticResource QtyEditDataTemplate210Low}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S210}" Header="210" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B210}" CellEditTemplate="{StaticResource QtyEditDataTemplate210}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S215}" Header="215" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B215}" CellEditTemplate="{StaticResource QtyEditDataTemplate215}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S220}" Header="220" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B220}" CellEditTemplate="{StaticResource QtyEditDataTemplate220}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S225}" Header="225" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B225}" CellEditTemplate="{StaticResource QtyEditDataTemplate225}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S230}" Header="230" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B230}" CellEditTemplate="{StaticResource QtyEditDataTemplate230}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S235}" Header="235" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B235}" CellEditTemplate="{StaticResource QtyEditDataTemplate235}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S240}" Header="240" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B240}" CellEditTemplate="{StaticResource QtyEditDataTemplate240}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S245}" Header="245" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B245}" CellEditTemplate="{StaticResource QtyEditDataTemplate245}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S250}" Header="250" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B250}" CellEditTemplate="{StaticResource QtyEditDataTemplate250}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S255}" Header="255" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B255}" CellEditTemplate="{StaticResource QtyEditDataTemplate255}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S260}" Header="260" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B260}" CellEditTemplate="{StaticResource QtyEditDataTemplate260}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S265}" Header="265" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B265}" CellEditTemplate="{StaticResource QtyEditDataTemplate265}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S270}" Header="270" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B270}" CellEditTemplate="{StaticResource QtyEditDataTemplate270}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S275}" Header="275" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B275}" CellEditTemplate="{StaticResource QtyEditDataTemplate275}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S280}" Header="280" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B280}" CellEditTemplate="{StaticResource QtyEditDataTemplate280}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S285}" Header="285" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B285}" CellEditTemplate="{StaticResource QtyEditDataTemplate285}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S290}" Header="290" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B290}" CellEditTemplate="{StaticResource QtyEditDataTemplate290}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S295}" Header="295" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B295}" CellEditTemplate="{StaticResource QtyEditDataTemplate295}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S300}" Header="300" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B300}" CellEditTemplate="{StaticResource QtyEditDataTemplate300}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding S300High}" Header="이상" DataFormatString="#,##0" TextAlignment="Right" IsFilterable="False" IsSortable="False" IsGroupable="False" IsReadOnly="{Binding SsoOrdDtlSet.B300High}" CellEditTemplate="{StaticResource QtyEditDataTemplate300High}"/>
   </telerik:RadGridView.Columns>
  </telerik:RadGridView>



Templete Source

 <DataTemplate x:Key="QtyEditDataTemplate210Low">
  <Grid d:DesignWidth="194" d:DesignHeight="86">
   <TextBox Text="{Binding S210Low, Mode=Twoway}" TextAlignment="Right" IsReadOnly="{Binding S210Low, Converter={StaticResource NumericToBoolConverter}}" BorderThickness="0"/>
  </Grid>
 </DataTemplate>

 <DataTemplate x:Key="QtyEditDataTemplate210">
  <Grid d:DesignWidth="194" d:DesignHeight="86">
   <TextBox Text="{Binding S210, Mode=Twoway}" TextAlignment="Right" IsReadOnly="{Binding S210, Converter={StaticResource NumericToBoolConverter}}" BorderThickness="0"/>
  </Grid>
 </DataTemplate>

 <DataTemplate x:Key="QtyEditDataTemplate215">
  <Grid d:DesignWidth="194" d:DesignHeight="86">
   <TextBox Text="{Binding S215, Mode=Twoway}" TextAlignment="Right" IsReadOnly="{Binding S215, Converter={StaticResource NumericToBoolConverter}}" BorderThickness="0"/>
  </Grid>
 </DataTemplate>
..

sometime edit in grid, raise error

error1.png : error program
error2.png : error message

error message

Microsoft JScript 런타임 오류: Unhandled Error in Silverlight Application COM 구성 요소 호출에서 HRESULT E_FAIL 오류가 반환되었습니다.   위치 MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   위치 MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
   위치 MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
   위치 System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
   위치 System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
   위치 System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   위치 System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   위치 System.Windows.Controls.Control.set_DefaultStyleKey(Object value)
   위치 System.Windows.Controls.TextBox..ctor()
   위치 MS.Internal.CoreTypes.GetCoreWrapper(UInt32 typeId)
   위치 MS.Internal.ManagedPeerTable.EnsureManagedPeer(IntPtr unmanagedPointer, Int32 typeIndex, Type type, Boolean preserveManagedObjectReference)
   위치 MS.Internal.XcpImports.ConvertDO(IntPtr doPointer, Int32 typeIndex, Boolean releaseObjectReference)
   위치 MS.Internal.XcpImports.ConvertType(CValue outVal, Int32 typeIndex, Boolean releaseObjectReference, Boolean deleteBuffer, IManagedPeerBase fromObject)
   위치 MS.Internal.XcpImports.ConvertCValueForManagedWithType(Type propertyType, CValue& outVal, Int32 outDOType, Boolean releaseObjectReference, Boolean deleteBuffer, IManagedPeerBase fromObject)
   위치 MS.Internal.XcpImports.GetValue(IManagedPeerBase managedPeer, DependencyProperty property)
   위치 Telerik.Windows.Controls.RadWindow.OnLostFocus(RoutedEventArgs e)
   위치 System.Windows.Controls.Control.OnLostFocus(Control ctrl, EventArgs e)
   위치 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

how can i do?



4 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 21 Sep 2011, 09:44 AM
Hello Park,

Please consider using IsReadOnlyBinding property instead IsReadOnly, since "IsReadOnly" property cannot accept binding. For more information about how to use IsReadOnlyBinding property you can take a look at this online help topic.

Let me know if this doesn't help.

Regards,
Nedyalko Nikolov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Park
Top achievements
Rank 1
answered on 22 Sep 2011, 02:59 AM
hi Nedyalko Nikolov

thank you reply
i do change IsReadOnly to IsReadOnlyBainding, but my grid cell click is raise error.
my gridview version 2011.2.725.1040

IsReadOnly property binding is sometime error
IsReadOnlyBainding property binding is alway error, bad using

is no other way?
0
Accepted
Maya
Telerik team
answered on 22 Sep 2011, 08:33 AM
Hello Park,

I am sending you a sample project illustrating the usage of IsReadBinding with the version you are using. Can you take a look at the application and let me know whether you can get the same exception on it ?
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Park
Top achievements
Rank 1
answered on 05 Oct 2011, 06:41 AM
thank you Maya

maybe my mistake
today test it. good work

thankyou again
Asked by
Park
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Park
Top achievements
Rank 1
Maya
Telerik team
Share this question
or