How to delete the contents of a Datagrid?

Hi all

I want to delete the contents of a datagrid and be able to display the content again as needed.

I have two selectors datefield, two buttons. A button to view the log of the datagrid. Another button to delete the data grid.

< mx:HBox width = '100 percent"height ="100% ">
< mx:Label text = "From" / >
< mx:DateField id = showToday "dateFrom" = "true" enabled = "true".
formatString = "MM/DD/YYYY".
disabledRanges = "{[new Date(), {rangeStart: new Date()}]}" / >
< mx:Label text = 'To' / >
< mx:DateField id = showToday "dateTo" = "true" enabled = "true".
formatString = "MM/DD/YYYY".
disabledRanges = "{[new Date(), {rangeStart: new Date()}]}" / >

< mx:Button id = "btn1" label = "see the error log" click = "getErrorLog ()" / >

< mx:Button id = "btn2" label = "clear all" click = "clear ()" / >
< / mx:HBox >

But once I have delete the contents of the DataGrid, I'm not able to load the data again. I delete the content by using the following function:

private void clear (): void {}

dateFrom.text = "";
dateTo.text = "";
CDL of the var: Array = errorLogTable.columns;
var size: int = errorLogTable.columnCount;
cols.splice(0,Size);
errorLogTable.columns = cols;

}

errorLogTable is the id of my datagrid.

Remove all your columns is required?   in your code you not delete content, you delete all the columns.so, next time you have some columns to display the data. If you want to see empty DG, then use the following syntax.   errorLogTable.dataProvider = new ArrayCollection();

Tags: Flex

Similar Questions

  • How to delete the contents of a folder?

    There are a lot of items in a folder and remove them quickly without doing it individually.

    Techniques of standard selection on the computer.
    Select a message to get the focus on the record.
    Press Ctrl + a to select

    Select a message by clicking on it. Up or down several message and hold the SHIFT key while clicking on another message to select a block of messages.

    Hold down the control key while clicking random messages to select messages that are not in a sequence.

    Hold down the CTRL key when you click on a selected message to deselect a message.

  • How to clear the contents of my old iPad without also erase it from my other?

    I backed up my new iPad Air2 use iCloud and now want to delete all the contents of my old iPad. How can I do this without also deleting the content of my new iPad?

    Manipulation of content on the old iPad will not affect the content on the new iPad

    Following the instructions here should take care of it

    What to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

    Explanation: I am usually concerned about things such as notes and images - but if they are on the new iPad - and that is synchronized in the cloud, then signing of iCloud on the old device will not affect anything

    (I'm personally spent on 4 phones like that)

    Nice name it by the way Jonny Ives has a special link to Apple - google if you want that

  • I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names.

    * Original title: file names of photos of Deletig Windows after emptying the file

    I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names. How can I delete the file names?

    Right-click on the name of the image file, then choose 'delete '.

  • How to see the content of what's currently on my iCloud of this site

    How to see the content of what's currently on my iCloud.  I would like to see these files presented in a display of file manager type in order to sort and remove if necessary.

    Go to iCloud.com, then click on your iCloud drive icon.  I hope this is what you mean or what you are looking for.

    iCloud Drive FAQ - Apple Support

  • Delete the contents of the 'library of Photos' on the Mac won't do photos in iCloud?

    Delete the contents of the 'library of Photos' on the Mac won't do photos in iCloud? My pictures stopped downloading to iCloud because my Mac ran out of storage. 'Library of photos' on the Mac takes all of the storage. I'm pass photos to an external hard drive to the Mac App Photos then upload to iCloud.

    Delete the contents of the library of Photo on your Mac will also remove the contents of the Photo library in iCloud, because they are the same thing

  • How to replace the contents of the settings/passwords backup server / current browser bookmarks?

    Classic scenario: after the bookmark long manual organization Firefox Sync adds trash of its server to my laptop or tablet.

    Where can I find how to replace the content of the backup of the server by settings/passwords / current browser bookmarks? Stupid me, I put a new synchronization and lost this ability.

    It is not recommended to go back to the old version of Sync

    The old version is removed he'll stop being available soon, it takes getting used to using the new version.

    IIRC, it is actually possible to force synchronization of the old working with Fx29 & Fx30 using an old profile or preferences of piracy, but I don't think I should encourage users to try this, but it would be better than using an older version of Firefox which is really bad. In fact using an old outdated version of Firefox is so bad, that it is customary to recommend using a browser on alternative day of someone else instead.

    Firefox ESR is aimed at corporate users, definitely, at the moment, it will use the synchronization of the former. Who will update soon to use synchronization well again, and this time, I guess the synchronization of the former will probably totally frowned upon for example are not available at all.

    It is possible to use the feedback system to leave a short comment on Sync. I would recommend this making, but at least to make very many people of spirit comments that I doubt will have no effect.

  • What happens if I delete the contents of the my SubscriptionPlayCache folder in iTunes?

    Hello world

    I'm on a MacBook Pro (El Capitan 10.11.2, 2.4 GHz/4 GB), with 121 GB of Flash storage and I'm running out of hard drive space.

    I got a new time Capsule recently and more backups were transfer files to this (pictures, videos, etc.), but I just noticed the iTunes cache - specifically "SubscriptionPlayCache" has 9.1 GB of data in it. I regularly listen to music while I work, then, of course, that this has been over time.

    Will be the rumble of coming world down if I delete the contents of this file, leaving the folder itself in place (to begin its inexorable March upward the Hill of filling of storage)?

    Thank you!

    Music files Apple cache: http://dougscripts.com/itunes/2015/09/new-flush-apple-music-cache-files/ - ~/Library/Caches/com.apple.iTunes/SubscriptionPlayCache/ file, which is a bit like a "iTunes Media" folder for music from Apple

    You might find yourself with a bunch of broken links in iTunes for tracks pointing to these files. You could always delete those that many find that painful and unsightly to have them even.

  • How to delete the files from my HP ePrint app after download / print?

    Can someone tell me how to delete the files from my HP ePrint app after that I downloaded and printed. Thank you

    jmsandkds,

    I apologize for the confusion. Options you speak of "photos, web and file" are located on the phone somewhere, lets say you click files. When you click on files, it will search the phone for available files that are able to print the ePrint app. To the extent where they are on the phone, you will need to search for them via the search screen, connection to the computer, or some files are program specific and only available in this program to be read, edited, or deleted.

    I hope this helps.

  • How to restore the contents of the folder workstation in the default format in Windows XP?

    Dear Sir or Madam:

    I have a desktop of Microsoft Windows XP Home Edition Version 2002 Service Pack 3.

    Contents of the my computer folder is not in the correct format, I want whatever it is corrupt.

    How to restore the contents of the folder workstation to the original format?

    The first JPEG image is the content of the folder post current work that has the corrupted display format.

    The second JPEG image is the content of the folder post original work that is in the correct format.

    Please reply back soon.

    Thank you.

    Looks like you saw. Rearrange icons by | Name. Try to organize by Type and other options while keeping rearrange icons by | Show in groups were also checked.
     
  • Safely delete the contents of the ProgramFiles/Windows/Temp dir? __And I can remove the content of Documents and Settings/User1/Local settings/Temp dir? __Thanks for any advice! __

    Can I safely remove or delete the contents of a 'Temp' directory in Windows?

    -Documents and Settings / User1 / Local settings / Temp

    -Program Files / Windows / Temp

    Yes, you can delete the contents of any temporary directory. You can use disk cleanup or CCleaner . If you use CCleaner, use only the cleaning tools. Let tools registry and other options alone . MS - MVP - Elephant Boy computers - don't panic!

  • How to compare the content of two Wordpad / documents notebook without reading them line by line?

    How to compare the content of two Wordpad / documents notebook without reading them line by line?

    Hello

    Without this feature is included in the operating system.

    However, you can use your favorite search engine to look for software that needs to perform these tasks.

    WARNING of THIRD PARTY SOFTWARE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information helps.

  • How to view the contents of the c drive since it is almost full despite the movement of documents, etc. on the D drive

    I moved the documents, pictures, music etc all of drive D and removed all of the excess programs. Despite this C is always showing almost complete. How to see the content?

    I moved the documents, pictures, music etc all of drive D and removed all of the excess programs. Despite this C is always showing almost complete. How to see the content?

    Buna,

    See if this little program will help you to tell you what is causing this lack of space for you problem

    http://www.Jam-software.com/treesize_free/

    Revedere.

  • How to delete the history of google, tried to delete the browsing history, that works, but it does not delete the site from google (in the middle of the page next to the images and videos

    How to delete the history in the Google search box in the middle of the page under Web new video Images

    http://www.Google.com/support/WebSearch/bin/answer.py?hl=en&answer=465

    See if help above.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to print the contents of a hard drive?

    Title: list of files on a specific drive.

    How to print the contents of a hard drive?  I would like to be able to remove the old files, but it would be easier if I could print the content rather than scroll through the file by file.

    Hello

    These should help:
     
    How to save and print a list of directory for a file and the folder of Vista (Windows 7 is the)
    same)
    http://www.Vistax64.com/tutorials/114593-file-folder-directory-list-print-save.html

    How to add view and directory of print in the context Menu in Vista and Windows 7 file
    http://www.Vistax64.com/tutorials/146031-context-menu-add-view-print-file-directory.html

    Use this free program which is great:

    KarenWare - printer - free directory
    http://www.KarenWare.com/PowerTools/ptdirprn.asp

    How to add the feature print directory for files in Windows XP, Windows Vista or Windows 7
    http://support.Microsoft.com/default.aspx/KB/321379

    I hope this helps.

Maybe you are looking for