回复 23楼Neha的帖子
VB.net代码:
- c1FlexGrid1.Cols(1).Editor = c1DropDownControl1
- Me.c1DropDownControl1.DropDownFormAlign = C1.Win.C1Input.DropDownFormAlignmentEnum.Right
- Me.c1DropDownControl1.DropDownFormClassName = "ControlExplorer.Input.DropDowns.ImageMapping"
复制代码
- Public Partial Class ImageMapping
- Inherits C1.Win.C1Input.DropDownForm
- Private ht As Hashtable
- Public Sub New()
- InitializeComponent()
- AddHandler Me.Open, AddressOf ImageMapping_Open
- End Sub
- Private Sub ImageMapping_Open(sender As Object, e As EventArgs)
- Dim obj As Object = OwnerControl.Value
- End Sub
- Private Sub ImageMapping_Load(sender As Object, e As EventArgs)
- ' TODO: This line of code loads data into the 'c1NWindDataSet.Categories' table. You can move, or remove it, as needed.
- Me.categoriesTableAdapter.Fill(Me.c1NWindDataSet.Categories)
- End Sub
- Private Sub c1FlexGrid2_Click(sender As Object, e As EventArgs)
- Dim obj As Object = c1FlexGrid2.Selection.Data
- If obj IsNot Nothing Then
- OwnerControl.Value = obj
- CloseDropDown()
- Else
- OwnerControl.Value = "None Selected"
- End If
- End Sub
- End Class
复制代码
VB.net源码demo:
需要自己替换数据库:app.config文件里面“connectionString="rovider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Users\rogerwang\Documents\Visual Studio 2012\Projects\C1_WF_C1FlexGrid\C1_WF_C1FlexGrid\C1NWind.mdb""
”
|