cancel
Showing results for 
Search instead for 
Did you mean: 

how to handle matrix columns????

Former Member
0 Kudos

hi everyone,

i have user form with a matrix with some columns.......

in my matrix when i put cursor iam able to enter values to each and every column.......that should not happen..only first column whould be enable to enter value

actually...for the first column i have a CFL...when i select a value from CFL the corresponding values should get feeded in to remaining columns as well....

how to achieve this scenario..?????

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You can make these columns editable false or you can set your bubbleevent to false on the key down event for that columns

Regards

Former Member
0 Kudos

hi..thanx

can u plz send me the sample code to get this functionality.....

Former Member
0 Kudos

Hi Shenaz,

If you're using XML Forms, just set the columns Editable property to 0 (zero).


<column uid="ColName" type="16" title="Name of the Column" description="" visible="1" ... editable="0" ... >
   <databind databound="1" table="@TABLE" alias="U_FIELD"></databind>
   <ExtendedObject></ExtendedObject>
</column>

About the CFL, here's a sample:


                                    Select Case pVal.ColUID
                                        Case "EmpCode"
                                            If oDataTable.Rows.Count <> 0 And oDataTable.Columns.Count <> 0 Then
                                                With oForm.DataSources.DBDataSources.Item("@SEI_TIMESHEET1")
                                                    .SetValue("U_EmpCode", oCFLEvent.Row - 1, oDataTable.GetValue("Code", 0).ToString)
                                                    .SetValue("U_EmpName", oCFLEvent.Row - 1, oDataTable.GetValue("Name", 0).ToString)
                                                    .SetValue("U_DelCode", oCFLEvent.Row - 1, oDataTable.GetValue("U_DelCode", 0).ToString)
                                                    .SetValue("U_DelName", oCFLEvent.Row - 1, oDataTable.GetValue("U_DelName", 0).ToString)
                                                    If oCFLEvent.Row = .Size Then
                                                        .InsertRecord(.Size)
                                                        .SetValue("LineId", .Size - 1, CStr(.Size))
                                                    End If
                                                End With

                                                oForm.Items.Item(pVal.ItemUID).Specific.LoadFromDataSource()
                                                oForm.Items.Item(pVal.ItemUID).Specific.AutoResizeColumns()
                                            End If
                                    End Select

I'm just catching the CFL on a specific column, but I'm setting the values on 3 other columns as well, based on the value the user choose.

Regards,

Vítor Vieira