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

Cascading GridViewComboBoxColumn filled from Domain Data Source

5 Answers 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Informatica - BES
Top achievements
Rank 1
Informatica - BES asked on 10 Jun 2014, 02:14 AM
Hi everyone,
I am having some doubts about how to bind some data to a RadGridView with two cascading combobox column's from a Domain Data Source.

This is my xaml mainpage code:

<UserControl x:Class="TesteProject.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
             xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
             xmlns:my="clr-namespace:TesteProject.Web"
             xmlns:my2="clr-namespace:TesteProject">

    <Grid x:Name="LayoutRoot">
        <telerik:RadGridView Name="radGridView1" AutoGenerateColumns="False" EditTriggers="CellClick">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn x:Name="CorrelationCode" UniqueName="CorrelationCode" DataMemberBinding="{Binding CorrelationCode}" />
                <telerik:GridViewComboBoxColumn x:Name="Legacy" Header="Legacy" HeaderTextAlignment="Center"
                                            DataMemberBinding="{Binding LegacyCode, Mode=TwoWay}" DisplayMemberPath="LegacyDescription" SelectedValueMemberPath="LegacyCode" Width="120" UniqueName="Legacy" >
                </telerik:GridViewComboBoxColumn>
                <telerik:GridViewComboBoxColumn x:Name="CorrelationGroup" Header="Correlation Group Code" HeaderTextAlignment="Center" ItemsSource="{StaticResource AvailableCorrelationGroups}"
                                            DataMemberBinding="{Binding CorrelationGroupCode, Mode=TwoWay}" DisplayMemberPath="Description" SelectedValueMemberPath="CorrelationGroupCode" Width="120" UniqueName="CorrelationGroup"  >
                </telerik:GridViewComboBoxColumn>
                
                <telerik:GridViewDataColumn x:Name="FromValue" UniqueName="From Value" DataMemberBinding="{Binding FromValue}" />
                <telerik:GridViewDataColumn x:Name="ToValue" UniqueName="To Value" DataMemberBinding="{Binding ToValue}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        
    </Grid>
</UserControl>

xaml.cs code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows;
using PortalMiddleOffice.Web;
using System.ServiceModel.DomainServices.Client;
using System.ComponentModel;
using Telerik.Windows.Controls.GridView;

namespace TestProject
{
    public partial class MainPage : UserControl
    {
        private CorrelationDomainContext _context = new CorrelationDomainContext();
        public MainPage()
        {
            InitializeComponent();

            _context = new CorrelacaoDomainContext();
           
            //LoadOperation<CorrelationGroup> loadCorrelationGroup = _context.Load(_context.GetCorrelationGroupsQuery());

            //((GridViewComboBoxColumn)this.radGridView1.Columns["CorrelationGroup"]).ItemsSource = loadCorrelationGroup.Entities;
            

            LoadOperation<Legacy> loadLegacies = _context.Load(_context.GetLegaciesQuery());

            ((GridViewComboBoxColumn)this.radGridView1.Columns["Legacy"]).ItemsSource = loadLegacies.Entities;
            
            this.radGridView1.ItemsSource = _context.vwFromToCorrelation;
            _context.Load(_context.GetVwFromToCorrelationsQuery());

            this.AddHandler(RadComboBox.SelectionChangedEvent, new Telerik.Windows.Controls.SelectionChangedEventHandler(comboSelectionChanged));
        }

        void comboSelectionChanged(object sender, RadRoutedEventArgs args)
        {
            RadComboBox comboBox = (RadComboBox)args.OriginalSource;

            if (comboBox.SelectedValue == null || comboBox.SelectedValuePath != "LegacyCode") // we take action only if the continent combo is changed
                return;

            vwFromToCorrelation test = comboBox.DataContext as vwFromToCorrelation;
            test.LegacyCode = (int)comboBox.SelectedValue;//we submit the value immediately rather than waiting the cell to lose focus.
        }

        private void vwFromToCorrelationDomainDataSource_LoadedData(object sender, System.Windows.Controls.LoadedDataEventArgs e)
        {

            if (e.HasError)
            {
                System.Windows.MessageBox.Show(e.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
                e.MarkErrorAsHandled();
            }
        }
    }
    
    public class vwLocalFromToCorrelation : INotifyPropertyChanged
    {

        private CorrelationDomainContext _context = new CorrelationDomainContext();

        private int? legacyCode;
        public int? LegacyCode
        {
            get
            {
                return this.legacyCode;
            }
            set
            {
                this.legacyCode= value;
                this.OnPropertyChanged("LegacyCode");
                this.LegacyCode = null;
            }
        }
        private int? correlationGroupCode;
        public int? CorrelationGroupCode
        {
            get
            {
                return this.correlationGroupCode;
            }
            set
            {
                this.correlationGroupCode= value;
                this.OnPropertyChanged("CorrelationGroupCode");
            }
        }


        public IEnumerable<CorrelationGroup> AvailableCorrelationGroups
        {
            get
            {
                return from c in _context.CorrelationGroups
                       where c.LegacyCode== this.LegacyCode
                       select c;
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}

After finish binding the RadGridView, all column's are correctly filled, except CorrelationGroup. It stays 'blank'.

I am not so good on silverlight application so maybe the solution is easier than i think.

Thank you very much.

5 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 12 Jun 2014, 07:49 AM
Hi Rafael,

You can use the ItemsSourceBinding property to provide the items for the ComboBox, from the business object. That way when the master ComboBox, changes the selected value, you can change the ItemsSource for the cascading ComboBox.

Hope this helps. 

Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Informatica - BES
Top achievements
Rank 1
answered on 17 Jun 2014, 01:39 PM
Hi Nik.

I did it and it started working, but maybe there is something wrong, because not all columns became editable.

I am binding data from a SQL Server view and trying to edit some tables from this gridview based on this sql view.

Is there something wrong doing this way? Because the columns are not editable, only the first one and if i press Tab key, another one becomes editable, but not all them.
0
Dimitrina
Telerik team
answered on 18 Jun 2014, 12:38 PM
Hi Rafael,

As I understand you would like to have all the GridViewComboBoxColumns in a row in edit mode. I am afraid this is not possible, it is actually allowed to only have one cell in edit mode at a time.

To achieve your goal, you can use GridViewColumn instead and redefine its CellTemplate, placing a RadComboBox/ComboBox for it. You can also check our online documentation on defining CellTemplate/CellEditTemplate for a reference.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Informatica - BES
Top achievements
Rank 1
answered on 18 Jun 2014, 02:36 PM
Hi Didie,

It is not on the same time, when i double click on cell to edit, not all enter in edit mode, same setting CellClick as EditTrigger.

Take a look:

.xaml
<telerik:RadGridView Name="radGridView1" MinHeight="350" MaxHeight="430" Height="Auto" AutoGenerateColumns="False" EditTriggers="CellClick" RowEditEnded="radGridView1_RowEditEnded" BeginningEdit="radGridView1_BeginningEdit" DataLoadMode="Asynchronous">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn UniqueName="CodigoCorrelacao" DataMemberBinding="{Binding CodigoCorrelacao}" />
                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding CodigoSistemaLegado, Mode=TwoWay}"
                                                Header="Legado"
                                                ItemsSourceBinding="{Binding Source={StaticResource ViewModel},Path=ListaSistemaLegado}"
                                                UniqueName="Legado"
                                                x:Name="Legado"
                                                DisplayMemberPath="DescricaoSistemaLegado"
                                                SelectedValueMemberPath="CodigoSistemaLegado" />
                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding CodigoGrupoCorrelacao, Mode=TwoWay}"
                                                ItemsSourceBinding="{Binding Source={StaticResource ViewModel},Path=GruposDisponiveis}"
                                                x:Name="GrupoCorrelacao"
                                                UniqueName="GrupoCorrelacao"
                                                Header="Grupo"
                                                DisplayMemberPath="Descricao"
                                                SelectedValueMemberPath="CodigoGrupoCorrelacao"
                                                Width="400" />
                <telerik:GridViewDataColumn x:Name="ValorOrigem" UniqueName="ValorOrigem" DataMemberBinding="{Binding ValorOrigem}" IsReadOnly="False" />
                <telerik:GridViewDataColumn x:Name="ValorDestino" UniqueName="ValorDestino" DataMemberBinding="{Binding ValorDestino}" />
                <telerik:GridViewColumn Header="Deletar">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton Content="Deletar" Command="telerik:RadGridViewCommands.Delete" CommandParameter="{Binding}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

MainPage.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows;
using System.ServiceModel.DomainServices.Client;
using System.ComponentModel;
using Telerik.Windows.Controls.GridView;
using System.IO;
using System.Windows.Data;
using System.Collections.ObjectModel;
using PortalMiddleOffice.MurexService;

namespace PortalMiddleOffice
{
    public partial class MainPage : UserControl
    {
        //private CorrelacaoDomainContext _context = new CorrelacaoDomainContext();
        public string UserNameLoggedIn;
        public MainPage()
        {
            try
            {
                InitializeComponent();

                //ViewCorrelacao objViewCorrelacao = new ViewCorrelacao();

                //_context = new CorrelacaoDomainContext();
                //_context.Load(_context.GetVwDeParaCorrelacaosQuery(), GetGridDataCompleted, null);

                //List<ViewCorrelacao> vwCorrelacao = new List<ViewCorrelacao>();
                //vwCorrelacao.Add(new ViewCorrelacao() { CodigoSistemaLegado = 1, CodigoGrupoCorrelacao = 1, CodigoCorrelacao = 1, DescricaoGrupoCorrelacao = "teste", DescricaoSistemaLegado = "teste", ValorDestino = "teste", ValorOrigem = "teste" });
                //LoadSistemasLegadoGrid();
                LoadCorrelacoesGrid();

                //this.radGridView1.ItemsSource = ViewCorrelacoes.lstVwCorrelacao;

                //((GridViewComboBoxColumn)this.radGridView1.Columns["Legado"]).ItemsSource = ViewCorrelacoes.lstSistemaLegado;

                //((GridViewComboBoxColumn)this.radGridView1.Columns["GrupoCorrelacao"]).ItemsSource = ViewCorrelacoes.lstGrupoCorrelacao;
                //radGridView1.Rebind();

                this.AddHandler(RadComboBox.SelectionChangedEvent, new Telerik.Windows.Controls.SelectionChangedEventHandler(comboSelectionChanged));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            
        }

        private void LoadCorrelacoesGrid()
        {
            MurexServiceClient mxClient = new MurexServiceClient();
            mxClient.RetornaViewCorrelacoesCompleted += new EventHandler<RetornaViewCorrelacoesCompletedEventArgs>(RetornaViewCorrelacoesCompleted);
            mxClient.RetornaViewCorrelacoesAsync();
        }

        void RetornaViewCorrelacoesCompleted(object sender, RetornaViewCorrelacoesCompletedEventArgs e)
        {
            PagedCollectionView pageCollectionView = new PagedCollectionView(e.Result);
            dpDataPager.Source = pageCollectionView;
            radGridView1.ItemsSource = pageCollectionView;
        }

        private void LoadSistemasLegadoGrid()
        {
            MurexServiceClient mxClient = new MurexServiceClient();
            mxClient.RetornaSistemasLegadoCompleted += new EventHandler<RetornaSistemasLegadoCompletedEventArgs>(RetornaSistemasLegadoCompleted);
            mxClient.RetornaSistemasLegadoAsync();
        }

        void RetornaSistemasLegadoCompleted(object sender, RetornaSistemasLegadoCompletedEventArgs e)
        {
            ((GridViewComboBoxColumn)this.radGridView1.Columns["Legado"]).ItemsSource = e.Result;
        }

        private void btnAdicionar_Click(object sender, RoutedEventArgs e)
        {
            this.radGridView1.BeginInsert();
        }

        protected IEnumerable<object> itemsToBeDeleted;
        private void dgCorrelacao_Deleting(object sender, Telerik.Windows.Controls.GridViewDeletingEventArgs e)
        {
            //store the items to be deleted
            itemsToBeDeleted = e.Items;

            //cancel the event so the item is not deleted
            //and wait for the user confirmation
            e.Cancel = true;
            //open the Confirm dialog
            RadWindow.Confirm("Tem certeza?", this.OnRadWindowClosed);
        }
        protected void btnExport_Click(object sender, RoutedEventArgs e)
        {
            dpDataPager.PageSize = 0;
            string extension = "xls";
            SaveFileDialog dialog = new SaveFileDialog()
            {
                DefaultExt = extension,
                Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
                FilterIndex = 1
            };
            if (dialog.ShowDialog() == true)
            {
                using (Stream stream = dialog.OpenFile())
                {
                    radGridView1.Export(stream,
                     new GridViewExportOptions()
                     {
                         Format = ExportFormat.Html,
                         ShowColumnHeaders = true,
                         ShowColumnFooters = true,
                         ShowGroupFooters = false,
                     });
                }
            }
            dpDataPager.PageSize = 16;
        }
        private void OnRadWindowClosed(object sender, WindowClosedEventArgs e)
        {
            ////check whether the user confirmed
            //bool shouldDelete = e.DialogResult.HasValue ? e.DialogResult.Value : false;
            //if (shouldDelete)
            //{
            //    foreach (ViewCorrelacao objViewCorrelacao in itemsToBeDeleted)
            //    {
            //        radGridView1.Items.Remove(objViewCorrelacao);
            //        Correlacao objCorrelacao = new Correlacao();
            //        objCorrelacao.CodigoCorrelacao = objViewCorrelacao.CodigoCorrelacao;
            //        _context.Correlacaos.Detach(objCorrelacao);
            //    }
            //}
        }

        void comboSelectionChanged(object sender, RadRoutedEventArgs args)
        {
            RadComboBox comboBox = (RadComboBox)args.OriginalSource;

            if (comboBox.SelectedValue == null
                || comboBox.SelectedValuePath != "CodigoSistemaLegado") // we take action only if the continent combo is changed
                return;

            vwCorrelacao location = comboBox.DataContext as vwCorrelacao;
            location.CodigoSistemaLegado = (int)comboBox.SelectedValue;//we submit the value immediately rather than waiting the cell to lose focus.
        }

        private void radGridView1_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
        {
            //if (e.EditAction == GridViewEditAction.Cancel)
            //    return;
            //if (e.EditOperationType == GridViewEditOperationType.Edit)
            //{
            //    vwDeParaCorrelacao objEditCorrelacao = e.Row.DataContext as vwDeParaCorrelacao;
            //    Correlacao objCorrelacao = new Correlacao();

            //    objCorrelacao.CodigoCorrelacao = objEditCorrelacao.CodigoCorrelacao;
            //    objCorrelacao.CodigoGrupoCorrelacao = objEditCorrelacao.CodigoGrupoCorrelacao;
            //    objCorrelacao.ValorOrigem = objEditCorrelacao.ValorOrigem;
            //    objCorrelacao.ValorDestino = objEditCorrelacao.ValorDestino;
            //    objCorrelacao.DataAlteracao = DateTime.Now.ToString();
            //    objCorrelacao.UsuarioAlteracao = UserNameLoggedIn;

            //    _context.Correlacaos.Attach(objCorrelacao);
            //}
            //else if (e.EditOperationType == GridViewEditOperationType.Insert)
            //{
            //    vwDeParaCorrelacao objInsertCorrelacao = e.Row.DataContext as vwDeParaCorrelacao;

            //    Correlacao objCorrelacao = new Correlacao();
            //    objCorrelacao.CodigoCorrelacao = objInsertCorrelacao.CodigoCorrelacao;
            //    objCorrelacao.CodigoGrupoCorrelacao = objInsertCorrelacao.CodigoGrupoCorrelacao;
            //    objCorrelacao.ValorOrigem = objInsertCorrelacao.ValorOrigem;
            //    objCorrelacao.ValorDestino = objInsertCorrelacao.ValorDestino;
            //    objCorrelacao.DataInclusao = DateTime.Now.ToString();
            //    objCorrelacao.UsuarioInclusao = UserNameLoggedIn;

            //    _context.Correlacaos.Attach(objCorrelacao);
            //}
        }

        private void vwDeParaCorrelacaoDomainDataSource_LoadedData(object sender, LoadedDataEventArgs e)
        {
            if (e.HasError)
            {
                System.Windows.MessageBox.Show(e.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
                e.MarkErrorAsHandled();
            }
        }

        private void radGridView1_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            this.radGridView1.BeginEdit();
        }

        private void vwDeParaCorrelacaoDomainDataSource_LoadedData_1(object sender, LoadedDataEventArgs e)
        {
            if (e.HasError)
            {
                System.Windows.MessageBox.Show(e.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
                e.MarkErrorAsHandled();
            }
        }

        //private void vwDeParaCorrelacaoDomainDataSource_LoadedData(object sender, System.Windows.Controls.LoadedDataEventArgs e)
        //{

        //    if (e.HasError)
        //    {
        //        System.Windows.MessageBox.Show(e.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
        //        e.MarkErrorAsHandled();
        //    }
        //}
    }

    public class ViewCorrelacao : INotifyPropertyChanged
    {
        private int? codigoSistemaLegado;
        public int? CodigoSistemaLegado
        {
            get
            {
                return this.codigoSistemaLegado;
            }
            set
            {
                if (value != this.codigoSistemaLegado)
                {
                    this.codigoSistemaLegado = value;
                    this.OnPropertyChanged("CodigoSistemaLegado");
                    this.CodigoGrupoCorrelacao = null;
                }
            }
        }

        private int? codigoGrupoCorrelacao;
        public int? CodigoGrupoCorrelacao
        {
            get
            {
                return this.codigoGrupoCorrelacao;
            }
            set
            {
                this.codigoGrupoCorrelacao = value;
                this.OnPropertyChanged("CodigoGrupoCorrelacao");
            }
        }

        public int CodigoCorrelacao { get; set; }

        public string ValorDestino { get; set; }

        public string ValorOrigem { get; set; }

        public IEnumerable<GrupoCorrelacao> GruposDisponiveis
        {
            get
            {
                return from c in ViewCorrelacoes.lstGrupoCorrelacao
                       where c.CodigoSistemaLegado == this.CodigoSistemaLegado || this.CodigoSistemaLegado == null
                       select c;
            }
        }

        public IEnumerable<SistemaLegado> ListaSistemaLegado
        {
            get
            {
                return ViewCorrelacoes.lstSistemaLegado;
            }
        }

        public IEnumerable<vwCorrelacao> ListaCorrelacoes
        {
            get
            {
                return ViewCorrelacoes.lstVwCorrelacao;
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}

ViewModel

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
//using PortalMiddleOffice.Web;
using System.ServiceModel.DomainServices.Client;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using PortalMiddleOffice.MurexService;

namespace PortalMiddleOffice
{
    public class ViewCorrelacoes
    {
        public static List<Correlacao> lstCorrelacao;
        public static List<vwCorrelacao> lstVwCorrelacao;
        public static List<GrupoCorrelacao> lstGrupoCorrelacao;
        public static List<SistemaLegado> lstSistemaLegado;


        static ViewCorrelacoes()
        {
            lstCorrelacao = new List<Correlacao>();
            lstVwCorrelacao = new List<vwCorrelacao>();
            lstGrupoCorrelacao = new List<GrupoCorrelacao>();
            lstSistemaLegado = new List<SistemaLegado>();

            MurexServiceClient mxCliente = new MurexServiceClient();
            mxCliente.RetornaViewCorrelacoesCompleted += new EventHandler<RetornaViewCorrelacoesCompletedEventArgs>(RetornaViewCorrelacoesCompleted);
            mxCliente.RetornaViewCorrelacoesAsync();

            mxCliente.RetornaGrupoCorrelacaoCompleted += new EventHandler<RetornaGrupoCorrelacaoCompletedEventArgs>(RetornaGrupoCorrelacaoCompleted);
            mxCliente.RetornaGrupoCorrelacaoAsync();

            mxCliente.RetornaSistemasLegadoCompleted += new EventHandler<RetornaSistemasLegadoCompletedEventArgs>(RetornaSistemasLegadoCompleted);
            mxCliente.RetornaSistemasLegadoAsync();
        }

        static void RetornaViewCorrelacoesCompleted(object sender, RetornaViewCorrelacoesCompletedEventArgs e)
        {
            IEnumerable<vwCorrelacao> obsCollection = (IEnumerable<vwCorrelacao>)e.Result;
            var list = new List<vwCorrelacao>(obsCollection);
            lstVwCorrelacao = list;
        }

        static void RetornaGrupoCorrelacaoCompleted(object sender, RetornaGrupoCorrelacaoCompletedEventArgs e)
        {
            IEnumerable<GrupoCorrelacao> obsCollection = (IEnumerable<GrupoCorrelacao>)e.Result;
            var list = new List<GrupoCorrelacao>(obsCollection);
            lstGrupoCorrelacao = list;
        }

        static void RetornaSistemasLegadoCompleted(object sender, RetornaSistemasLegadoCompletedEventArgs e)
        {
            IEnumerable<SistemaLegado> obsCollection = (IEnumerable<SistemaLegado>)e.Result;
            var list = new List<SistemaLegado>(obsCollection);
            lstSistemaLegado = list;
        }


        //public class GrupoCorrelacao
        //{
        //    public int CodigoGrupoCorrelacao { get; set; }
        //    public int CodigoSistemaLegado { get; set; }
        //    public string CampoSistemaLegado { get; set; }
        //    public string Descricao { get; set; }
        //    public string MapeamentoSistemaLegado { get; set; }
        //    public string Referencia { get; set; }
        //    public string RegraEspecifica { get; set; }
        //}

        //public class SistemaLegado
        //{
        //    public int CodigoSistemaLegado { get; set; }
        //    public string DescricaoSistemaLegado { get; set; }
        //    public byte Ativo { get; set; }
        //}

        //public class Correlacao
        //{
        //    public int CodigoCorrelacao { get; set; }
        //    public int CodigoGrupoCorrelacao { get; set; }
        //    public string DataAlteracao { get; set; }
        //    public string DataInclusao { get; set; }
        //    public string UsuarioAlteracao { get; set; }
        //    public string UsuarioInclusao { get; set; }
        //    public string ValorDestino { get; set; }
        //    public string ValorOrigem { get; set; }
        //}

        //public class vwDeParaCorrelacao
        //{
        //    public int CodigoCorrelacao { get; set; }
        //    public int CodigoGrupoCorrelacao { get; set; }
        //    public int CodigoSistemaLegado { get; set; }
        //    public string DescricaoGrupoCorrelacao { get; set; }
        //    public string DescricaoSistemaLegado { get; set; }
        //    public string ValorDestino { get; set; }
        //    public string ValorOrigem { get; set; }
        //}
    }
}

What am i doing wrong?

Tks,
Rafael
0
Dimitrina
Telerik team
answered on 19 Jun 2014, 09:05 AM
Hello Rafael, 

Setting EditTriggers="CellClick" should lead to getting into edit mode once you click on a cell.
Would it be possible for you to isolate it in a demo project and send it to us? You can take a look at this blog post for a reference on how to isolate an issue. 

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Informatica - BES
Top achievements
Rank 1
Answers by
Nick
Telerik team
Informatica - BES
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or