Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.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
Asp.net 如何在网格中运行时将数据添加到特定列中_Asp.net_.net 3.5_Grid_Telerik_Asp.net 3.5 - Fatal编程技术网

Asp.net 如何在网格中运行时将数据添加到特定列中

Asp.net 如何在网格中运行时将数据添加到特定列中,asp.net,.net-3.5,grid,telerik,asp.net-3.5,Asp.net,.net 3.5,Grid,Telerik,Asp.net 3.5,在ItemDataBound事件中尝试以下操作: I have a rad grid, i have bounded the columns in the grid using GripBoundColumns which shows me dropdown cloumns when i edit the record, Insert/update/delete are working fine for me. My question is it possible to insert new

在ItemDataBound事件中尝试以下操作:

I have a rad grid, i have bounded the columns in the grid using GripBoundColumns which shows me dropdown cloumns when i edit the record, Insert/update/delete are working fine for me.


My question is it possible to insert new data into the column(Not the whole record just only to one column) when i edit the record.

For example...

suppose i have 5 columns (Client Name, Account No, Account name, account status, Custodian Dealer)

CustodianDealer is my drop down coloumn and data for it comes from different table

when i edit or insert a new record in the grid, i can select the existing Custodiandealers in the table.

now if i want to insert a new record to the custodianDealer table not to the grid, how can i acheive it
GridDataItem本质上是一个TableCell,因此您可以根据需要添加控件


哦,如果我的注释不清楚,“[ColumnNameAsString]”是您自己的列名。

连接grid insert命令并执行insert查询,该查询仅使用新条目更新保管人交易商表。要在下拉编辑器中显示该记录,请确保新记录与网格主表源以及保管商表中的其他项具有外部关系。

因此,如果我正确理解了您的问题,您正在尝试根据编辑/插入期间所做的一些更改将记录插入保管商表

如果是这种情况,您可以处理ItemCommand事件并根据这些更改更新datatable


您能否提供用例的确切详细信息?

可能需要用户在运行时添加或编辑新的保管人经销商。如果您不提供有关问题的更详细信息,这将很难帮助您解决问题。您能否提供一个界面截图,其中包含一些关于如何添加新托管经销商的评论?它会从网格中添加吗?从网格外的另一个表单字段?听起来列表是一个下拉列表,那么您是否使用Telerik组合框来允许文本输入字段?请尽可能具体,这将帮助你更快地得到答案。你能给我举一个小例子来说明方法吗
If TypeOf (e.Item) Is GridDataItem Then
    Dim GDI As GridDataItem = CType(e.Item, GridDataItem)

    GDI([ColumnNameAsString]).Text = "Some custom text"
End If