on 03-26-2007 5:40 AM
Hi all,
I want to make some fields non editable.Even though i didnt use the editable mode = 'X' it is editable.How can i make it non editable.
Thanks,
Ranjith.
Hi Ranjith,
If you want to make only somefields editable in the tableview ,then you have to create the iterator class.
Please check this blog:
/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
You need to create the iterator class in SE24,
1. You need to make IF_HTMLB_TABLEVIEW_ITERATOR as interface for this class. Once you save it you should see the 3 methods in your class.
2. Now you re-define the methods of the class - in the change mode there is a button for redefining the method. Place your cusor on the method and click the re-define button.
4. You need to use GET_COULUMN_DEFINITIONS method to
define what columns you want to dispaly in the table view
the required columns needs to be populated in the table of type TABLEVIEWCONTROL (look at the structure to uderstand what needs to be done)
5. You use RENDER_ROW_START method to get the data for the current row of the table.
6. You use RENDER_CELL_START for accessing each cell with in your table view. This is the most important method which will allow you to change the cell rendering during runtime.
7. Once you have done all of this activate your class. Declare a page attribute type ref to this iterator class you created.[r_iterator TYPE REF TO MY_ITERATOR ]
8. create a instance of this iterator in OnCreate [CREATE OBJECT ITERTOR] and use this in your table view attributes.
<htmlb:tableView id = "myTableView"
visibleRowCount = "<%= count %>"
width = "<%= width%>"
selectionMode = "SINGLESELECT"
selectedRowIndex = "<%= var_selectedindex %>"
table = "<%= itab %>"
iterator = "<%= r_iterator %>"
</htmlb:tableView>
regards,
Bhanu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ranjith,
Use the foll code in OnLayout,
<htmlb:inputField id = "ip1"
type = "BCD"
disabled="TRUE"
/>
Rgds,
Jothi.P
let me know the outcome.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ranjith,
Check the standrd BSP Appln bc/bsp/sap/<b>sbspext_htmlb</b>/default.htm
By default all the column in the tableview will be non editable.If yu want to achieve tablecolumn editable, use iterator as described in the standard appln.
Rgds,
Jothi.P
<i><u>
Reward pts for useful answers..</u></i>
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.