We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

can''t see the selected value

I´m using the grid 1.6.8.1, and in the first column i have a choise list with two values. I select a value from the drop down list, but when i leave the cell y don''t see this value. However i know the value still selected in the cell. I have some other choiselists in the same grid that works fine. Any solutions? Thanks.

4 Replies

AD Administrator Syncfusion Team March 17, 2004 02:54 PM UTC

Is the problem only with the very first cell in 1,1? If you click, say in 2,1, do things work? If so, the problem may be the first cell was set current before it was initialized with the combo information. You could call grid.CurrentCell.MoveTo(-1,-1) to force teh grid to not have an initial current cell, an dthis would avoid this problem. If the problem is with the whole column, then check to see if the column is ReadOnly or disabled or something. Can you post a sample project showing the problem?


DA Daniela March 18, 2004 10:58 AM UTC

The problem appeared when I put the 1.6.1.8 version. In the 1.6.1.0 I had other problems (that this new version resolved), but this appeared. The problem is with the whole column, not only with the first row. This is the code that put a row in my grid, the column with the logic operators is the problem: Private Sub cmdInsertar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdInsertar.Click Try Dim i As Integer Dim col As New System.Collections.Specialized.StringCollection i = Me.grdFiltros.RowCount + 1 Me.grdFiltros.Rows.InsertRange(i, 1) Me.grdFiltros.RowStyles.Item(i).Clickable = True ''Operadores logicos If i = 1 Then Me.grdFiltros(i, 1).Enabled = False Else Me.grdFiltros(i, 1).CellType = "ComboBox" Me.grdFiltros(i, 1).BackColor = Color.White Me.grdFiltros(i, 1).DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.Exclusive col.Add("Y") col.Add("O") Me.grdFiltros(i, 1).ChoiceList = col End If ''Campos Me.grdFiltros(i, 3).CellType = "ComboBox" Me.grdFiltros(i, 3).BackColor = Color.White Me.grdFiltros(i, 3).DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.AutoComplete Me.grdFiltros(i, 3).DataSource = Me.dsAllCampos.Tables("Campos") Me.grdFiltros(i, 3).DisplayMember = "cm_nombre" Me.grdFiltros(i, 3).ValueMember = "cm_id" ''Operadores relacionales Me.grdFiltros(i, 4).CellType = "ComboBox" Me.grdFiltros(i, 4).BackColor = Color.White Me.grdFiltros(i, 4).DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.Exclusive col = New System.Collections.Specialized.StringCollection col.Add("Igual") col.Add("Distinto") col.Add("Mayor") col.Add("Menor") col.Add("MayorIgual") col.Add("MenorIgual") col.Add("Entre") Me.grdFiltros(i, 4).ChoiceList = col ''Parentesis Me.grdFiltros(i, 2).Enabled = False Me.grdFiltros(i, 7).Enabled = False ''Argumento 2 deshabilitado Me.grdFiltros(i, 6).Enabled = False Catch ex As Exception Dim p As New iError(ex.Message, ex) End Try End Sub >Is the problem only with the very first cell in 1,1? If you click, say in 2,1, do things work? If so, the problem may be the first cell was set current before it was initialized with the combo information. You could call grid.CurrentCell.MoveTo(-1,-1) to force teh grid to not have an initial current cell, an dthis would avoid this problem. > >If the problem is with the whole column, then check to see if the column is ReadOnly or disabled or something. > >Can you post a sample project showing the problem?


AD Administrator Syncfusion Team March 18, 2004 11:56 AM UTC

I put your code into the little sample below, and it seemed to work OK for me with 1618. Does the sample work for you? What are you doing differently? forum11869_6473.zip


DA Daniela March 23, 2004 12:24 PM UTC

I changed some of the properties of the grid, and the problem disapeared. I think there was a problem with the back color, selection color and text color. Thanks for your help. Daniela >I put your code into the little sample below, and it seemed to work OK for me with 1618. Does the sample work for you? > >What are you doing differently? > >forum11869_6473.zip > >

Loader.
Live Chat Icon For mobile
Up arrow icon