This is a migrated thread and some comments may be shown as answers.

Cell Editing Throws Error

1 Answer 47 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Srini
Top achievements
Rank 1
Srini asked on 22 Oct 2010, 10:50 PM
Hi,
I'm using a simple datacolumn and when i try to edit the cell it trows error

Webpage error details

Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.IO.FileLoadException: Could not load file or assembly 'Telerik.Windows.Controls.Input, Version=2010.2.924.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
File name: 'Telerik.Windows.Controls.Input, Version=2010.2.924.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'
   at Telerik.Windows.Controls.GridViewDataColumn.GetNewValueFromEditor(Object editor)
   at Telerik.Windows.Controls.GridView.GridViewCell.GetNewValueFromEditor()
   at Telerik.Windows.Controls.GridView.GridViewCell.TryConvertValueFromEditor(Object& returnValue)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.RaiseCellValidatingEvent(GridViewCell cell)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ValidateCell(GridViewCell cell)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformCellValidation(GridViewCell cell)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCurrentCellInfoChanging(GridViewCellInfo oldCell, GridViewCellInfo newCell)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.set_CurrentCellInfo(GridViewCellInfo value)
   at Telerik.Windows.Controls.GridView.GridViewCell.OnGotFocus(RoutedEventArgs e)
   at System.Windows.Controls.Control.OnGotFocus(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)    

Line: 53
Char: 13
Code: 0
URI: http://localhost 


This is my Code.

<telerik:RadGridView x:Name="rgvExpenseBased" ShowColumnFooters="True" ShowGroupFooters="True" AutoGenerateColumns="False" 
                             CanUserFreezeColumns="False" Grid.Row="1" DragElementAction="None" ShowGroupPanel="False" IsFilteringAllowed="False" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Income}" Header="Income" IsReadOnly="True" Width="0.22*" >
                    <telerik:GridViewDataColumn.Footer>
                        <TextBlock Text="Total"/>
                    </telerik:GridViewDataColumn.Footer>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding PrevMonthExpenses}" Header="Previous Month Sep Expenses" IsReadOnly="False" FooterTextAlignment="Right" TextAlignment="Right">
                    <telerik:GridViewDataColumn.Footer>
                        <TextBlock x:Name="tbkTotalPrevMonthPer" Text="50000"/>
                    </telerik:GridViewDataColumn.Footer>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding CurrentMonthExpenses}" Header="Current Month Oct Expenses" IsReadOnly="False" FooterTextAlignment="Right" TextAlignment="Right" >
                    <telerik:GridViewDataColumn.Footer>
                        <TextBlock x:Name="tbkTotalPrevMonthAmt"  Text="50000"/>
                    </telerik:GridViewDataColumn.Footer>
                </telerik:GridViewDataColumn>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Email}" Header="Email Alert" IsReadOnly="False" FooterTextAlignment="Center"  TextAlignment="Center"></telerik:GridViewCheckBoxColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

This is how i'm Binding in Code Behind

List<ExpenseBasedData> data = new List<ExpenseBasedData>();
            data.Add(new ExpenseBasedData("Food", "5000", "2500", false));
            data.Add(new ExpenseBasedData("Groceries", "5000", "5000", false));
            data.Add(new ExpenseBasedData("Fuel", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Vehicle maintenance", "1500", "1500", false));
            data.Add(new ExpenseBasedData("Entertainment", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Transportation", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Education", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Books & Magazines", "1000", "1000", false));
            data.Add(new ExpenseBasedData("Clothes / Apparel", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Health & Medicine", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Medical/Health Insurance", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Personal care", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Rent", "3750", "5000", false));
            data.Add(new ExpenseBasedData("Telephone", "1000", "1000", false));
            data.Add(new ExpenseBasedData("Mobile", "1500", "1500", false));
            data.Add(new ExpenseBasedData("Electricity", "2500", "2500", false));
            data.Add(new ExpenseBasedData("Home expenses", "5000", "5000", false));
            data.Add(new ExpenseBasedData("Other Expenses", "5000", "3750", false));
  
            this.rgvExpenseBased.ItemsSource = data;

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 26 Oct 2010, 07:50 AM
Hello Srini,

Unfortunately I was not able to reproduce the issue you described.
Can you verify that all dll's are located in the Bin directory of your project?

Please follow these steps:
1.Create a new Silverlight project.
2.Right click on it and choose the option RadControls For Silverlight --> Convert to Telerik Silverlight Application and add the references you need from the Installation folder as it is shown in the attached picture.
3.Paste the snippet you provided.
4.Build and Run your application and edit any cell.

Try the approach above and let me know if the issue still exists.

Best wishes,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Srini
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or