Asp.net 如何在网格中运行时将数据添加到特定列中
在ItemDataBound事件中尝试以下操作: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
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