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

Grid Cell not keeping edit change

4 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 11 Feb 2010, 07:22 PM
I have a RadGridView control that is being populated from a WCF service and if I set the autogeneratecolumns=True, when I enter the cell and change the contents, it changes works fine; however if I set it to false it reverts back to the original content of the cell.   I want to be able to control which columns display

My WCF service returns the data into a datatable.

         <telerik:RadGridView  Name="grd1" AutoGenerateColumns="False" Width="1000" Height="100" CanUserFreezeColumns="False"
            <telerik:RadGridView.Columns > 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemCode}" Header="ISBN" UniqueName="ItemCode" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
 

I tried adding the column in XAML and doing it in VB.NET and when autogen is false -- it won't keep the change.   

Is there some other code behind that I need to do to make the cell change stay ?

        Dim VenCode As String 
        If cbVendor.SelectedValue = "*" Then VenCode = "%" Else VenCode = cbVendor.SelectedValue 
        Dim sqlCmd As String 
        sqlCmd = "SELECT TOP 100 PERCENT dbo.ToBeReturned.ItemCode , dbo.Inventory.Title as Description, " _ 
                & "dbo.ToBeReturned.Qty, upper(RTRIM(Ltrim(dbo.ToBeReturned.RtnVendor))) as Vendor, dbo.ToBeReturned.Invoice, " _ 
                & "dbo.ToBeReturned.InvoiceDt, dbo.ToBeReturned.Discount, dbo.ToBeReturned.Price as Cost, " _ 
                & "UPPER(dbo.ToBeReturned.RtnVendor) as orgVendor FROM dbo.ToBeReturned " _ 
                & "INNER Join dbo.Inventory ON dbo.ToBeReturned.ItemCode = dbo.Inventory.ItemCode Where Vendor Like '" & VenCode & "'" 
        '//ieData.AddPrm("@myKey", pType.pString, "ARC", True) 
        '//ieData.FindQry("QryFindCat") 
        ieData.ChangeQry(sqlCmd) 
        Dim column As New GridViewDataColumn() 
        column.DataMemberBinding = New Binding("ItemCode"
        column.Header = "ISBN" 
        column.UniqueName = "ItemCode" 
        Me.grd1.AutoGenerateColumns = False 
        Me.grd1.Columns.Add(column) 
        grd1.ItemsSource = ieData.dt 
 

4 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 17 Feb 2010, 11:45 AM
Hello Mark,

I've tried to simulate the issue unfortunately to no avail. Since the described behavior sounds like bug, can you send me a sample project (based on Northwind database) which I can debug on my side? Thanks in advance.

Sincerely yours,
Nedyalko Nikolov
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.
0
A Vincent
Top achievements
Rank 1
answered on 28 Mar 2017, 07:57 PM
Was there ever a solution to this? I'm having the same problem in UI for Winforms using VB.net. I thought I had set everything up correctly but no column subjected to LTRIM(RTRIM()) is not updating properly
0
A Vincent
Top achievements
Rank 1
answered on 28 Mar 2017, 08:03 PM
This seems to apply to all queries with any transformation at all, not just ltrim(rtrim(
0
Ivan Ivanov
Telerik team
answered on 31 Mar 2017, 04:11 PM
Hi,

The initially reported issue was not reproduced on our side. You mentioned that you experience a similar behavior with "UI for Winforms using VB.net". Can you please confirm whether you are using the WPF GridView, or the WinForms one, as they are different controls, which do not share the code base? In case it is WPF, you can try isolating the issue in a sample project. Here is a blog that can guide you through this process. If it is WinForms, I will get you in touch with the WinForms team.

Regards,
Ivan Ivanov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
A Vincent
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or