jQuery UI Widgets › Forums › DataTable › DataTable + Tabs question.
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 7 years, 9 months ago.
-
Author
-
Hello,
I’m trying a datatable with tabs setup, and trying to load the contents of an .txt file into one tab using the following code inside of one tab:
var tests = $("<textarea id='"+row.nemonico+"-plantilla'>placeholder</textarea>"); $( row.nemonico+"-plantilla" ).load( "<txt path>" );
I’m getting the textarea just filled with the “placeholder” text, not the contents of the .txt file.
I’ve tested the code outside the datatble and it works as intended populating the textarea with the .txt contents. Is there a special way to load the contents with datatable and i’m doing it just the wrong way or it’s not possible due to some process on the code?
Thank you.
Hello Zaito,
I would suggest you load all data as a datafield in the DataAdapter and set
createEditor
callback to use TextArea widget in the DataTable.
Please, take a look at this demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatatable/javascript-datatable-inline-editing.htm?lightBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHello Hristo,
Thank you for your answer.
That won’t work for me since I’ve already done the table, but for each record, I need to load the correct .txt.
Those .txt have some information for each specific entry and they are quite big so I cannot store them into an array, that’s why I’m trying to load direcly from each .txt file.Bottom line, I have a DataTable with all the entries done, but each entry requires to load the contents of an especific .txt on a Tab inside a textarea (would work too on a popup or a window actually, the thing is to be able to load the contents).
Thank you.
Hello Zaito,
I would like to suggest you two approaches that could be helpful.
One way is after the DataTable is created to set for each one record the relevant information (from the ‘.txt’ file).
You could do this in theready
callback or immediately after initialization of the DataTable.Another approach that I want to suggest you is to use
beforeLoadComplete
callback of the DataAdapter. There you could add to specific datafield the concrete data.
Please, take a look at this demo. I would like to focus your attention on the “beforeLoadComplete”, only to see how could add additional data.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.