Grid Cell not keeping edit change

5 posts, 0 answers
  1. Mark
    Mark avatar
    5 posts
    Member since:
    Oct 2006

    Posted 11 Feb 2010 Link to this post

    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 
     

  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 17 Feb 2010 Link to this post

    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.
  3. A Vincent
    A Vincent  avatar
    4 posts
    Member since:
    Dec 2016

    Posted 28 Mar in reply to Nedyalko Nikolov Link to this post

    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
  4. A Vincent
    A Vincent  avatar
    4 posts
    Member since:
    Dec 2016

    Posted 28 Mar in reply to A Vincent Link to this post

    This seems to apply to all queries with any transformation at all, not just ltrim(rtrim(
  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1195 posts

    Posted 31 Mar Link to this post

    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.
Back to Top