Focus on specific row after adding a new row

Focus on specific row after adding a new row

yishayhyishayh Posts: 108Questions: 17Answers: 0

Hi Allan,

What is the best way to achieve the following behavior?
After adding a new row to the table (done on server side) we want the table to:
1. Focus to the new row.
2. Highlight the new row.

Many thanks,
Yishay

Answers

  • allanallan Posts: 61,734Questions: 1Answers: 10,110 Site admin

    How exactly are you adding the new row? using Editor? If so, use submitComplete to know when the edit is complete and do whatever processing you require.

  • yishayhyishayh Posts: 108Questions: 17Answers: 0

    Hi Allan,

    We will be using the editor in some cases.
    What I meant asking was what api to use in order to achieve the focus and highlight.

    Many thanks,
    Yishay

  • allanallan Posts: 61,734Questions: 1Answers: 10,110 Site admin

    You would use row().node() to get the tr element. You can then do whatever focus or highlighting you want on it.

    Allan

This discussion has been closed.