on 02-24-2007 7:30 AM
Hi all
my problem is : when i click on a button to add new row in a table , it always appear below other rows and not at the top most line.
i know if add "0" to this method "addElement(var)" , it can solve my problem.
but if i add "0" in this method, it goes against my project requirement.
So anybody can help me out of this issue.
thanks in advance
kaushik
Hi Kaushik
Could you explain why adding an element at index 0 in a node ( and this solves you purpose), "goes against your project requirements" ?.
Is it that although you want the row to be added at the the top for user input, but after input it should logically be at the bottom. If that is the case what you can do is instead of making table rows editable, you can have input fields outside the table (on the top of the table as you want!) , and on the action of some add button, append the values input at the bottom.
Alternatively if you do not have two many input fields( just one or two), you can have the input fields in the table toolbar itself ( will always be on the top!), and on some action add the element to the table node..
Regards
kk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi to kk from kk
well kk i used the word "against my req." to restrict other users asking why i am not in mood to add "0" to add element , ok let me come to problem now :
On click of a button , i am adding a new row to my table.
the issue is when i use addElement(0, objResult), i am able to get my new blank row as the first row always and suppose i added number of rows ,but when i save the data it adds only one row to database.
and if just use addElement(objResult) then any number of rows gets added to database easily but the new blank row comes below the filled rows.
i am also thinking in a way that if anyhow i can set the index of my new blank row to "0"
and that may solve my problem. (what do u think abt this )
thanks
kaushik
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.