02-25-2009 12:53 PM
Hi All,
I am using Object oriented ALV Grid .In Status bar of the screen i'v an button to create new record in the ALV Grid(NOT an Standard Create button which comes with ALV Grid). When clicking the New record BUTTON,it will create the new record in the itab which is showing ALV GRID.After adding a record to the ITAB,i called " refresh_table_display" Method to make newly created record to be visible in the ALV GRID.
But After calling this method the cursor goes to the First Column of the first record.I want to set the cursor in the first column of the newly created Record.Kindly help me to set this cursor in the first column of the newly created record...
Thanks in advance..
02-25-2009 12:59 PM
Use Method set_current_cell_via_id of Class CL_GUI_ALV_GRID
FORM set_cursor_position USING p_wl_lines.
DATA : wl_is_row_id TYPE lvc_s_row,
wl_is_column_id TYPE lvc_s_col,
wl_is_row_no TYPE lvc_s_roid.
wl_is_row_id = p_wl_lines.
wl_is_row_no-row_id = p_wl_lines.
CALL METHOD w_grid->refresh_table_display
EXPORTING
i_soft_refresh = 'X'.
CALL METHOD w_grid->set_current_cell_via_id
EXPORTING
is_row_id = wl_is_row_id " Row No
is_column_id = wl_is_column_id " Column No
is_row_no = wl_is_row_no. " Row No.
ENDFORM. " set_cursor_position
02-25-2009 12:57 PM
02-25-2009 12:59 PM
Use Method set_current_cell_via_id of Class CL_GUI_ALV_GRID
FORM set_cursor_position USING p_wl_lines.
DATA : wl_is_row_id TYPE lvc_s_row,
wl_is_column_id TYPE lvc_s_col,
wl_is_row_no TYPE lvc_s_roid.
wl_is_row_id = p_wl_lines.
wl_is_row_no-row_id = p_wl_lines.
CALL METHOD w_grid->refresh_table_display
EXPORTING
i_soft_refresh = 'X'.
CALL METHOD w_grid->set_current_cell_via_id
EXPORTING
is_row_id = wl_is_row_id " Row No
is_column_id = wl_is_column_id " Column No
is_row_no = wl_is_row_no. " Row No.
ENDFORM. " set_cursor_position
02-25-2009 1:02 PM
Hi
ignore this post
Edited by: Hareesh Menon on Feb 25, 2009 2:02 PM
Edited by: Hareesh Menon on Feb 25, 2009 2:03 PM