I have found the answer to my question now.
It turns out I just needed to change:
var question = grid.getItem(e.rowIndex).question;
to:
var question = grid.store.getValue(grid.getItem(e.rowIndex), 'question');
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizGeneral Tech Learning Aids/Tools 2 years ago
Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
manpreet
Best Answer
2 years ago
I am using the Dojo Toolkit to build an SRS to both aid in my learning of both the Dojo Toolkit and the Japanese language.
For those of your who don't know an SRS is basically a flash card system.
So, I have a side bar where I can choose a deck of cards to review and when I click on a deck from the list it opens up a new tab in a
TabContainer
which contains twoContentPane
s.One
ContentPane
contains aDataGrid
which currently uses anItemFileWriteStore
with aurl
to ajson
file.The
json
file contains the items for theDataGrid
with each item possesing anid
,question
andanswer
.The
id
is currently just aninteger
value and thequestion
andanswer
both contain Japanese strings.The idea is that when a row in the
DataGrid
is clicked, theContentPane
below the one containing theDataGrid
should have it's contents replaced with adijit.Editor
.The original contents of the
ContentPane
before they are replaced is just a simple string sayingClick on the rows in the grid above to edit a card's details
.I am creating the
dijit.Editor
programmatically and everything works well until I try to give it a Japanese string from theDataGrid
's row.This is my JavaScript which gets the
DataGrid
row's information and creates thedijit.Editor
:(
grid
is theDataGrid
object andcard_details
is theid
of theContentPane
)The code above creates the
dijit.Editor
in theContentPane
but doesn't fill it with the value stored in thequestion
variable (I have logged and alerted the variable and it does contain the expected value).However if I replace the variable with a literal string like
My String
or even something in Japanese like反乱者
it works just fine.It even works if I replace:
var question = grid.getItem(e.rowIndex).question;
with:var question = '反乱者';
Does anybody know why it won't work when using the
question
variable when it has been assigned it's value viagrid.getItem(e.rowIndex).question
?I am still a beginner when it comes to Dojo Toolkit so I'm sure it must be something obvious.
Any help would be appreciated!