LiveCode Lessons
Topics
-
Data Grid Fundamentals 7
-
Working With Data Grids (Forms & Tables) 14
- How Do I Determine The Selected Line?
- How Do I Get Data Associated With a Row or Column?
- How Do I Add A Row Of Data To An Existing Data Grid?
- How Do I Update Data In a Row?
- How Do I Clear Data From a Data Grid?
- How Do I Add a mouseDown Event To The Data Grid Without Breaking It?
- How Can I Store An Option Menu Value When The User Makes a Selection?
- How Do I Refresh a Data Grid After Making Changes to a Template Through Script?
- How Do I Use A Template In Multiple Data Grids?
- How Can I See What The Data Grid's Internal Array Currently Looks Like?
- How Do I Get Aggregate Values for Columns?
- How Do I Determine If the Data Grid Has Focus?
- How Do I Export Data From A Data Grid?
- How Do I Work with Checkboxes in a Data Grid?
-
Working With Data Grid Tables 13
- How Do I Change Column Alignment?
- How Do I Sort By A Column?
- How Do I Resize Columns?
- How Do I Override the Default Behavior For Rendering Data to a Cell?
- How Do I Determine If a User Clicks In The Table Header?
- How Do I Display a Contextual Menu When the User Clicks on a Column Header?
- What If I Need to Work With htmlText, rtfText or unicodeText?
- How Do I Display Line Numbers in a Table?
- How Do I Customize Column Sorting?
- How Do I Disable Column Sorting?
- How Do I Perform An Action After the User Sorts a Data Grid?
- How Do I Align Decimals in a Column?
- How Can I Colorize Individual Lines in a Table?
-
Using The Built-In Field Editor 6
- How Do I Open a Table Cell For Editing?
- How Can The User Edit Field Content in a Data Grid Form?
- How Can I Edit The Text as UTF-8, UTF-16 or HTML?
- How Can I Select The Text in the Edit Field When It Opens?
- How Do I Save Changes The User Makes In An Editor Field To An External Data Source?
- How Can I Customize The Field Editor Behavior?
-
Building Standalones With The Data Grid 0
-
Useful Things To Know 1
-
API and Properties 3
Last Updated
Feb 22, 2018
Author: Maria Pantousi
Other Resources
Getting Started with LiveCode
- Get Up and Running with LiveCode
- Getting Started with LiveCode Development
LiveCode Lessons
- How To - Step-By-Step Guides To Tasks In LiveCode
- How To - LiveCode Server Tasks
- How To - LiveCode Mobile Tasks
- How To - LiveCode Sample Scripts
- How to - LiveCode Marketplace Products
- How to Purchase and License LiveCode
LiveCode Releases
- LiveCode 6.5
- LiveCode 6.7
- Summer School 2
- LiveCode 8
LiveCode Builder
- Creating Widgets
- Building, Sharing and Installing Extensions
Pais Razvan
How can I resize all the columns of datagrid from code?
With this instruction we can resize one by one
set the dgColumnWidth["Name"] of group "DataGrid" to 150
Thanks!
Elanor Buchanan
Hi Pais Razvan
One way you can do this is to set the "column widths" property of the Data Grid, This allows you to set all column widths at once, you set the property to a comma delimited list of integers where the items in the list are the widths of the columns e.g.
set the dgProps["column widths"] of group "DataGrid 1" to "50,100,150"
There is more about setting DataGrid properties in script in this lesson
http://lessons.livecode.com/m/datagrid/l/7343-data-grid-properties
I hope that helps.
Elanor