本文介绍了这是什么意思,RadComboBox comboBox =(RadComboBox)editItem [dtBoundColumn.ColumnName] .Controls [0];的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RadComboBox comboBox = (RadComboBox)editItem[dtBoundColumn.ColumnName].Controls[0];



这是什么意思
其中columnname = opname.

这里的edititem是什么,



what it means
where columnname=opname.

what is edititem here,and

GridEditableItem editItem = e.Item as GridEditableItem; 



是GridEditableItem的editItem对象?



is editItem object of GridEditableItem?

推荐答案

RadComboBox comboBox = (RadComboBox)editItem[dtBoundColumn.ColumnName].Controls[0];



在上一行中,当网格行处于编辑模式时,您尝试访问放置在gridview行中的组合框控件.

如果您将组合框放在gridview中(父级->子级),则要访问子级控件,您必须在行项中进行搜索,并且在搜索后必须将其强制转换为原始类型.



in the above line, you are trying to acces combobox control, placed inside your gridview row, while grid row is in edit mode.

if you put a combobox inside a gridview (parent -> child), to access the child controls you have to search them inside the row items, and you have to type cast it to original type after searching.

GridEditableItem editItem = e.Item as GridEditableItem; 



是的,在编辑"模式下,editItem是行项目.



Yes, editItem is a row Item while in Edit mode.


这篇关于这是什么意思,RadComboBox comboBox =(RadComboBox)editItem [dtBoundColumn.ColumnName] .Controls [0];的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 00:29