如何在运行时将数据添加到网格中的特定列中
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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 ItemDataBound 事件中尝试类似的操作:
GridDataItem 本质上是一个 TableCell,因此您可以根据需要添加控件。
哦,如果我的符号还不清楚,“[ColumnNameAsString]”是您自己的列名称。
Try something like this within the ItemDataBound event:
The GridDataItem is essentially a TableCell, so you can add controls as needed.
Oh, and if it wasn't clear from my notation, "[ColumnNameAsString]" is your own column name.
连接网格插入命令并执行插入查询,该查询仅使用新条目更新 Custodiandealers 表。要在下拉编辑器中显示它,请确保新记录与网格主表源具有外部关系,就像 Custodiandealers 表中的其余项目一样。
Wire the grid insert command and execute an insert query which updates merely the Custodiandealers table with a new entry. To display it in the dropdown editor, make sure the new record has a foreign relation with the grid main table source as the rest of the items in the Custodiandealers table.
因此,如果我正确阅读您的问题,您将尝试根据编辑/插入期间所做的一些更改将记录插入 custodianDealer 表中。
如果是这种情况,您可以处理 ItemCommand 事件并根据这些更改更新数据表。
您能提供用例的具体细节吗?
So, if I'm reading your problem correctly, you are trying to insert a record into the custodianDealer table based on some changes made during edit/insert.
If that's the case, you can handle the ItemCommand event and update your datatable based on those changes.
Can you provide the exact details of the use case?