Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
5909 | Jul 23,2003 03:43 PM UTC | Jul 28,2003 03:40 PM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
//C# private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridControlBase grid = sender as GridControlBase; if(grid != null) { GridCurrentCell cc = grid.CurrentCell; GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; if(cc != null) { if(cc.RowIndex == 6) ((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 4; else if(cc.RowIndex == 4) ((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 7; else if(cc.RowIndex == 2) ((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 10; else ((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 6; } } } 'VB.NET Private Sub GridControl1_CurrentCellShowingDropDown(ByVal sender As Object, _ ByVal e As Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs) _ Handles GridControl1.CurrentCellShowingDropDown Try Dim grid As GridControlBase = sender Dim cc As GridCurrentCell = grid.CurrentCell Dim cr As GridComboBoxCellRenderer = cc.Renderer ' If cc.RowIndex = 6 Then CType(cr.ListBoxPart, GridComboBoxListBoxPart).DropDownRows = 4 ElseIf cc.RowIndex = 4 Then CType(cr.ListBoxPart, GridComboBoxListBoxPart).DropDownRows = 7 ElseIf cc.RowIndex = 2 Then CType(cr.ListBoxPart, GridComboBoxListBoxPart).DropDownRows = 10 Else CType(cr.ListBoxPart, GridComboBoxListBoxPart).DropDownRows = 6 End If Catch End Try End Sub
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.