bbhank wrote:The first "answer" is in Italian. I don't speak it.
You missed MaxV's comment just under the link that says "the translate button is in the top left of the page".
Neither of the links suggested from LiveCode approach a solution to the question and problem as asked.
Your question, as asked, can't be answered. It's the equivalent of "I need exact instructions on how to build a house." Any answer must assume that you know the basics of how to use all construction tools, understand the measurements you need, the design plan of the house, the materials you will use, etc. There is no single answer that fits each project.
The problem is when in Form mode how to actually APPLY the template to the DataGrid! NONE of the instructions, tutorials, etc including the ones listed here, show one EXACTLY how to do this.
The first LC tutorial does exactly that, but you need to understand the terminology it uses and the features it references, particularly "behaviors", which is a specific feature for sharing scripts among objects. It also may help to convert your data to a LC array, depending on what you're getting back from the database. The general idea is:
1. You edit the template to include the objects (fields and buttons, etc.) that should be displayed in each row.
2. You edit the behavior script of the datagrid to tell it how to fill those objects with content.
Everyone's objects and behavior scripts will be different. The datagrid provides the framework and does the complicated data display for you, but you need to link up the items from your database content to the objects in your template. There's no automatic way to do that, and no way for the template to "know" what you want displayed.
I've tried the code in the lessons. They do not work and are not applicable to this application. The data here comes from a database and is populated by query. These queries work in other applications already on line but not in LiveCode. All searches point one back to these same crappy and unrelated excuses for tutorials and lessons on the LiveCode site.
See above; of course the examples won't work because the scripts are designed to link to the example template, which isn't going to be like yours. It does teach the concepts; it is up to you to generalize those to your project. Where your data comes from (a database in your case) doesn't matter; it's all just data. It could be from a text file, or an http query, or anything else. The idea is to take that data and link it to the objects in the form.
In addition there should be a pull down that selects from available templates and applies the selected template to the DataGrid from the pull down. All the coding is troublesome, inefficient, time wasting, mistake prone, especially for beginners. This would make everybody's life easier.
Again, there can be no generalized templates. Each template is designed by you to display the things specific to your data. This is no different than the design and layout you place on every card.
The frustration you are feeling right now is quite normal when learning a new environment and it will pass. You do need a certain amount of info before the paradigm falls into place and you get that "eureka" moment. Until that happens you'll probably feel you've hit a wall (or like you want to) -- but I encourage you to continue. Usually after about six weeks or so of wanting to sledgehammer your computer, a sudden light appears and everything becomes clear. I've seen it happen to dozens and dozens of now-proficient LiveCoders.
Tell you what -- if you post the exact content of one row of data, we can probably at least help you fill out the behavior script, which is the linking part you're asking about. You'll also need to tell us what objects you have placed in the form. If you include a snapshot of your template form, even better. We can help if we know what you're trying to work with.
Don't give up yet.