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
0
A
回答
0
ItemDataBound事件中嘗試是這樣的:
If TypeOf (e.Item) Is GridDataItem Then
Dim GDI As GridDataItem = CType(e.Item, GridDataItem)
GDI([ColumnNameAsString]).Text = "Some custom text"
End If
的GridDataItem本質上是一個TableCell的,所以您可以根據需要添加控件。
哦,如果從我的符號中不清楚,「[ColumnNameAsString]」是您自己的列名稱。
0
連線網格插入命令並執行插入查詢,該查詢僅使用新條目更新Custodiandealers表。要在下拉式編輯器中顯示它,請確保新記錄與網格主表來源具有外部關係,作爲Custodiandealers表中的其餘項目。
+0
你能提供給我一個小例子來做到這一點 – Sravanthi 2010-12-10 14:44:36
0
因此,如果我正確地閱讀了您的問題,您正試圖根據編輯/插入期間所做的某些更改將記錄插入到custodianDealer表中。
如果是這種情況,您可以處理ItemCommand事件並根據這些更改更新您的數據表。
你能否提供用例的確切細節?
相關問題
- 1. 在運行時將行和列添加到WPF數據網格
- 2. 如何將數據綁定到數據網格在運行時
- 3. 如何將綁定添加到數據網格中的列?
- 4. 將特定參數添加到WPF中的數據網格
- 5. 如何在Flex4的運行時添加項目到數據網格?
- 6. 在運行時將特定特徵添加到類
- 7. 在ExtJS中,如何將自定義CSS類添加到數據網格行?
- 8. 如何將加入的列添加到數據網格視圖
- 9. 如何將數據添加到現有表中的特定列?
- 10. 如何將數據添加到datagridview中的特定列?
- 11. Winforms將列添加到數據綁定數據網格
- 12. 如何在運行時將行添加到wpf應用程序中的數據網格?
- 13. 在運行時將文本框值添加到網格
- 14. 如何添加行綁定多列數據網格(Silverlight的4.0)
- 15. 在將行添加到datagridview時排列特定列
- 16. 添加css運行時到表格行和數據綁定行
- 17. 如何在代碼中的數據添加到列表中,同時運行
- 18. 如何在python中將隊列添加到隊列時運行函數
- 19. 如何將一個表的特定列添加到數據集?
- 20. 如何將新列添加到網格?
- 21. 如何將列添加到Cassandra中的特定行中
- 22. 如何將行添加到GXT網格
- 23. 如何手動將新行添加到數據網格
- 24. Java:如何在運行時將數據庫中的屬性添加到ResourceBundle?
- 25. 如何在運行時將綁定添加到TIdTCPServer?
- 26. 如何在運行時添加新列?
- 27. Javascript - ExtJs - 如何在數據網格中的第n行添加自定義行?
- 28. 如何在Silverlight數據網格中編輯一個特定列
- 29. 如何在網格達到特定高度時將垂直滾動條添加到外部網格面板?
- 30. 添加按鈕,在數據網格視圖的特定列在vb.net
我已經更新了後用一個例子 – Sravanthi 2010-12-09 19:53:22
上面的代碼不會對我的問題的工作 – Sravanthi 2010-12-09 21:21:47