Telerik的radgrid控件我们可以节省对每列的唯一值? [英] Telerik Radgrid Can we save a unique value against each column?

查看:192
本文介绍了Telerik的radgrid控件我们可以节省对每列的唯一值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的radgrid控件动态生成列,所以列数和他们的名字在飞​​行中产生的,因此是数据表的网格是绑定到。结果
每列可以重新presents在我的系统中的对象,或空单为用户创建一个新的对象。每个对象由一个独特的价值属性标识。结果
我想这个值设置为列,因此,网格编辑时,我想用这个值和更新的对象。
我很开放的建议。现在我想到的选项是

I am generating columns dynamically in my RadGrid, so column count and their names are generated on the fly and so is the datatable that the grid is to be bound to.
Each column either represents an object in my system, or an empty one for user to create a new object. Each object is identified by a unique value property.
I would like to set this value to the column, so, when the grid is edited, I would like to use this value and update the object. I am open for suggestions. For now I am thinking the options are


  • GridTemplateColumn 分配值的属性(我不认为是可能的)

  • 使用一个隐藏字段在列的标题(我怎么办呢?)

  • assigning the value to a property in GridTemplateColumn(which I dont think is possible)
  • use a hidden field in header of the column (how do I do it?)

要更加清晰,行和列是动态生成的。我使用的DataKeyNames的行。想知道如何,我应该对列进行存储唯一值!

To be more clear, both rows and columns are generated dynamically. I am using DataKeyNames for rows. Wondering how I should be storing unique values for columns!

任何帮助是AP preciated。

Any help is appreciated.

谢谢!

推荐答案

如果一个正式支持Telerik的这里存在这种情况,我怀疑。一种古怪的解决方案将采用一排隐藏字段,每列一个字段中,列各存储唯一的值。

I doubt if an official Telerik support exists here for this situation. One quirky solution will be to employ a row of hidden fields, one field per column, each storing unique value for the column.

这篇关于Telerik的radgrid控件我们可以节省对每列的唯一值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆