Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml UWP Telerik RadDataGrid不允许我通过按enter键结束行编辑_Xaml_Uwp_Telerik_Grid_Uwp Xaml - Fatal编程技术网

Xaml UWP Telerik RadDataGrid不允许我通过按enter键结束行编辑

Xaml UWP Telerik RadDataGrid不允许我通过按enter键结束行编辑,xaml,uwp,telerik,grid,uwp-xaml,Xaml,Uwp,Telerik,Grid,Uwp Xaml,我在结束Telerik的UWP RadDataGrid中的一行编辑时遇到问题。填充数据后,我单击单元格开始编辑。编辑完行后,我按enter键完成编辑,但它仍处于编辑模式。单击另一行中的单元格结束编辑,新数据保持完整,但绑定集合不会更新。下面是我正在使用的网格的屏幕截图: 以下是我的页面中的XAML代码: <tg:RadDataGrid ColumnDataOperationsMode="Flyout" x:Name="grid" ItemsSource="{x:Bind ViewMode

我在结束Telerik的UWP RadDataGrid中的一行编辑时遇到问题。填充数据后,我单击单元格开始编辑。编辑完行后,我按enter键完成编辑,但它仍处于编辑模式。单击另一行中的单元格结束编辑,新数据保持完整,但绑定集合不会更新。下面是我正在使用的网格的屏幕截图: 以下是我的页面中的XAML代码:

<tg:RadDataGrid ColumnDataOperationsMode="Flyout"  x:Name="grid" ItemsSource="{x:Bind ViewModel.Source}" UserEditMode="Inline"  Grid.ColumnSpan="4" Grid.Row="1"/>

我真的很感谢你的帮助。非常感谢

编辑完行后,我按enter键完成编辑,但它仍处于编辑模式

我创建了一个16299 UWP项目来测试并安装它的包。然后,我可以复制这个问题。但如果我将项目的目标版本更改为“15063”,当我点击
Enter
键时,它将成功提交编辑操作。所以,这个telerik控件在16299年运行时可能会出现一些问题。你可以向他们的官方网站Telerik报告这个问题

由于UWP的Telerik控件是开源的,您也可以检查其源代码并自行解决此问题,然后您可以自行编译自定义版本并在项目中使用

我在这行代码中看到了关于这个问题的相关代码:也许,你可以检查一下

单击另一行中的单元格结束编辑,新数据保持完整,但绑定集合不会更新

我没有看到你的代码,所以我不知道问题出在哪里。但对我来说效果很好。您可以查看我的简单代码示例以供参考:

<telerikGrid:RadDataGrid x:Name="DataGrid" ItemsSource="{x:Bind ls}" UserEditMode="Inline"></telerikGrid:RadDataGrid>

公共密封部分类主页面:第页
{
公共可观测集合ls{get;set;}
公共主页()
{
this.InitializeComponent();
ls=新的可观测收集(){新数据{Country=“India”,Capital=“new Delhi”},
新数据{Country=“南非”,Capital=“开普敦”},
新数据{Country=“Nigeria”,Capital=“Abuja”},
新数据{Country=“Singapore”,Capital=“Singapore”};
}
}
公共类数据:INotifyPropertyChanged
{
私人字符串(国家),;
公共字符串国家
{
获取{return\u Country;}
设置
{
_国家=价值;
提高产权变更(“国家”);
}
}
私人字符串资本;
公共字符串资本
{
获取{return\u Capital;}
设置
{
_资本=价值;
募集财产变更(“资本”);
}
}
公共事件属性更改事件处理程序属性更改;
public void RaisePropertyChange(字符串propertyName)
{
if(PropertyChanged!=null)
{
PropertyChanged(这是新的PropertyChangedEventArgs(propertyName));
}
}
}

Xavier,非常感谢您抽出时间提供详细的回复。我将在星期一调查此事。感恩节快乐!
public sealed partial class MainPage : Page
{
    public ObservableCollection<Data> ls { get; set; }
    public MainPage()
    {
        this.InitializeComponent();
        ls = new ObservableCollection<Data>() {new Data { Country = "India", Capital = "New Delhi"},
 new Data { Country = "South Africa", Capital = "Cape Town"},
 new Data { Country = "Nigeria", Capital = "Abuja" },
 new Data { Country = "Singapore", Capital = "Singapore" }  };
    }
}

public class Data:INotifyPropertyChanged
{
    private string _Country;
    public string Country
    {
        get { return _Country; }
        set
        {
            _Country = value;
            RaisePropertyChange("Country");
        }
    }

    private string _Capital;
    public string Capital
    {
        get { return _Capital; }
        set
        {
            _Capital = value;
            RaisePropertyChange("Capital");
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    public void RaisePropertyChange(string propertyName)
    {
        if (PropertyChanged!= null)
        {
            PropertyChanged(this,new PropertyChangedEventArgs(propertyName));
        }
    }
}