Skip navigation
ayuso_15
Currently Being Moderated

Cfgrid customization and notifications

Sep 20, 2011 11:57 AM

Tags: #edit #add #1; #cfgrid #cgrid #validate

I am working with HTML CFGRID as first time in CF9, I found that you can Delete, Update and Add records easier using this component.   But I have some questions about working with this feauture:                                                                                                                                                                                                                                                                                                 -  Is there a way to validate form cells when trying to update or add the records? Validate maximum length and type.  -  When adding insert button it will create 2 more buttons cancel and save, Can i customize labels for that button? My app is spanish written.  - How would be the easiest way to style the grid - How can i notify the user when a record has been updated or can't be updated because of an error or a new record has been created?    I attach code for the cfgrid, I am using a component too.   ----------------------cfgrid -------------                                                                                                                                                                                                                                                                            ----------Component--------

                                                                                                                                                        SELECT      actividad_id,                           actividad_resultado_esperado,                           actividad_resultado_obtenido,                                          actividad_horas_asignadas,                           subseccion_dsc,                           0,                           actividad_asignada,                           seccion_dsc,                                          actividad.subseccion_id,                                                    subseccion_apartado_id,                                                                                            apartado_dsc,                        act_alineada_planeacion                  FROM      actividad, seccion, subseccion,apartado                  WHERE     actividad.seccion_id = seccion.seccion_id                  AND          actividad.seccion_id = subseccion.seccion_id                  AND          actividad.subseccion_id = subseccion.subseccion_id                                 AND          apartado.seccion_id =* actividad.seccion_id                  AND          apartado.subseccion_id =* actividad.subseccion_id                                                AND          apartado.apartado_id =* actividad.apartado_id                  AND          empleado_id = #Arg_empleado_id#                 AND          periodo_id = #Arg_periodo_id#                 AND          anio = #Arg_anio#                 AND          actividad.seccion_id= #Arg_Seccion_id#                                     AND actividad.apartado_id = #bApartado#                                                                ORDER BY #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdir#                                                        ORDER BY actividad.subseccion_id ASC;                                                                                           SELECT '' as actividad_id, '(0) Registros encontrados' as actividad_resultado_esperado, '' as actividad_horas_asignadas, '' as apartado_dsc                                   

                                                                                                                                                                                                 UPDATE actividad                     SET #colname# = '#value#'                     WHERE actividad_id = #ARGUMENTS.gridrow.actividad_id#                                                           

                                                                                                                             DELETE FROM actividad                 WHERE actividad_id = #ARGUMENTS.gridrow.actividad_id#                                                                                                                                                                                          INSERT INTO [actividad]                        ([empleado_id]                        ,[seccion_id]                        ,[subseccion_id]                        ,[actividad_id]                        ,[apartado_id]                        ,[anio]                        ,[periodo_id]                        ,[cve_grupo]                        ,[actividad_resultado_esperado]                        ,[actividad_horas_asignadas]                        ,[actividad_asignada])                     VALUES                        (#Arg_empleado_id#                                                    ,#Arg_Seccion_id#                        ,1                        ,#ARGUMENTS.gridrow.actividad_id#                        ,#bApartado#                        , #Arg_anio#                        ,#Arg_periodo_id#                        ,'AAA101'                        ,'#ARGUMENTS.gridrow.actividad_resultado_esperado#'                         ,#ARGUMENTS.gridrow.actividad_horas_asignadas#                        ,1)                                          Apologies, an error has occurred. Please try again later.                                                                  

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points