Prevent focus out of datagrid cell?

Hi,
Can't figure this one out. I have a datagrid with an
itemEditEnd bound to a function "erorrcheck" that checks the
correctness of the value entered in a cell. If the value is not
allowable, I need the focus to be prevented from leaving the cell.
I tried these two method to solve this problem, but neither
worked:
1) if a value entered isn't allowed, then at the end of the
function "errorcheck" the datagrid's editedItemPosition is used.
2) an "editerror" flag is set in the function "errorcheck". A
function "forcecursor" is bound to the datagrid's ITEM_FOCUS_OUT
event. In the "forcecursor" function, the "editerror" flag is
checked for an error, and if it is "true", then the datagrid's
editItemPosition is used.
One problem I have found that may be compounding the ability
to find a solution is that the itemEditEnd is triggered twice when
the user tabs out of any one cell. What's going on with that?

I worked all day on it and I always get it 5 minutes after I
post here
grid.editedItemPosition = { columnIndex:1,rowIndex:0 };
It's in the docs under info for the call later method.
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=L iveDocs_Parts&file=00001438.html

Similar Messages

  • DataGrid Column Focus Out Event

    I have an editable datagrid and I'm trying to accomplish the
    following:
    When a user edits a cell, then focuses out, a function is
    called that sends off a service with that value, along with the id
    value in that same item. I've tried using itemFocusOut, but I'm
    getting bizzare results---the function is executing multiple times.
    So i need the function to know what cell was focused out, and also
    all of the other information that accompanies that item.
    Thanks for any help.

    Here's what I ended up doing.
    Somewhere after Load, I added:
    PropertyDescriptor pd = DependencyPropertyDescriptor.FromProperty(DataGridColumn.ActualWidthProperty, typeof(DataGridColumn));
    foreach (DataGridColumn column in Columns) {
    //Add a listener for this column's width
    pd.AddValueChanged(column, new EventHandler(ColumnWidthPropertyChanged));
    Then the following 2 methods:
    private bool _columnWidthChanging;
    private void ColumnWidthPropertyChanged(object sender, EventArgs e)
    // listen for when the mouse is released
    _columnWidthChanging = true;
    if (sender != null)
    Mouse.AddPreviewMouseUpHandler(this, BaseDataGrid_MouseLeftButtonUp);
    void BaseDataGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    if (_columnWidthChanging) {
    _columnWidthChanging = false;
    /// whatever you wanted to do here
    The ColumnWidthPropertyChanged fires constantly while the user drags the width around, so if you just listen to that, you'll be over-doing it.
    Adding the PreviewMouseUp handler let me only do my processing when the user is done changing the width.
    Hope this helps someone.
    Janene

  • How to keep the focus in a table cell as long as it is invalid?

    Hello,
    if you run the following code and enter some alphabetic characters in the Integer column,
    you can't get out of the cell as long as focus transfer is within the table. But if you click in the textfield,
    the cell is left invalid. (If you click in the textfield immediately after the false edit, the cell even doesn't
    show the red border)
    I tried to attach a focusListener to the table, but that makes editing the table impossible.
    I also could attach a focusListener to each and every other component of the form,
    and checking the table there in focusGained - but that looks rather awkward.
    How would you proceed?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class InvalidInput extends JFrame {
      public InvalidInput() {
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLayout(new FlowLayout());
        setSize(200, 200);
        setTitle("InvalidInput");
        final String HEADER[] = {"Integer", "String"};
        DefaultTableModel dtm= createTableModel(HEADER);
        dtm.addRow(new Object[] {new Integer(100), "Item 1"});
        dtm.addRow(new Object[] {new Integer(200), "Item 2"});
        final JTable table= new JTable(dtm);
        table.addFocusListener(new FocusAdapter() {
          public void focusLost(FocusEvent e) {
         System.out.println(table.isEditing());
         if (table.isEditing()) {
           boolean b= table.getCellEditor().stopCellEditing();
           System.out.println(b);
    //       if (!b) table.requestFocusInWindow();
    //       if (!b) table.changeSelection(table.getEditingRow(),
    //                         table.getEditingColumn(), false, false);
           if (!b) {
             DefaultCellEditor editor= (DefaultCellEditor)table.getCellEditor();
             editor.getComponent().requestFocusInWindow();
        JScrollPane scrollPane = new JScrollPane(table);
        scrollPane.setPreferredSize(new Dimension(195,55));
        add(scrollPane);
        JTextField tf= new JTextField(10);
        add(tf);
        setVisible(true);
      public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
         new InvalidInput();
      private DefaultTableModel createTableModel(Object[] columnNames) {
        DefaultTableModel tblModel= new DefaultTableModel(columnNames, 0) {
          public Class getColumnClass(int column) {
         return getValueAt(0, column)==null ? Object.class :
                                   getValueAt(0, column).getClass();
        return tblModel;
    }Edited by: Jörg on 04.03.2012 14:52
    A big improvement is to apply
    table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);for this at least reverts the erroneous input to the last valid value.
    Still I would prefer either to inform the user of this reversion or to red-border the erroneous cell;
    for sometimes the [OK] button is at the bottom of a long form and putting one's eyes there for
    clicking, one doesn't necessarily notice the reversion which happens at the top.

    Thanks to both of you!
    @Jeanette
    In my real application I use a JFormattedTextField as editor. Checking my overridden stopCellEditing() method I become aware that the contents of JFormattedTextField (getText() or super.getCellEditorValue()) arrives there already reverted. Thus it's no wonder that I cannot return false.
    simply removes the editor on column resizingYikes! - Fortunately the table in question is not resizable.
    SwingX has a NumberEditorExHow would you proceed if you didn't know that class and were looking for it? I still don't manage to navigate successfully on java.net.
    @Walter
    Never thought of this. Seeing that someone is checking for me (red border), I'd rather lazily let him continue doing the job. But a DocumentListener looks like being a way out.

  • How to change content of DataGrid cell on mouse over

    I am trying to change content of a datagrid cell when the mouse is over it. Changing the dataProvider does not provide immediate feedback because update is performed by renderer. I am trying to directly update content of a cell onMouseOver and restore it onMouseOut.
    I am thinking of leaving the column empty and insert content onMouseOver, cleanup onMouseOut. Alternative, may be I can populate the column and mask out all but the cell the mouse is over.
    Any suggestion on how this may be done?
    Thanks!

    I would override updateDisplayList, call isItemHighlighted and set the content of the cell accordingly
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Adding MovieClip to DataGrid Cell

    Hi to all..
    I have added components like ComboBox, CheckBox etc in the
    DataGrid cell..
    But Now I want to add MovieClip If not possible then Swf in
    the DataGrid cell using cellrenderer.
    Is it possible to add such things.
    If yes can you guide me how..? I have spend 3 days after
    this... Please Help me out..
    Thanks.

    quote:
    Hi...
    I'm using AS3.
    By the way I have added Movieclip on the data grid cell...
    But now the problem is how to make it editable because I have
    added two components on the same cell...
    And that cell take this both component as object and you can
    not edit that object by just making that column as editable =
    true... so if any one can suggest me the way..
    the help will be appreciated......

  • JTable not getting latest data (unless mouse is focussed out of the cell)

    Hi,
    I am using JDK 1.4.2. I am having a basic problem of reading the data present in a JTable.
    JTable table = new JTable(9, 9);
    JButton solveButton = new JButton("Solve");
    solveButton.addActionListener(new DumpListener(table));The dump listener just dumps the data in the table.
    I have a 6*6 jtable where each value is a number. Now i focus the mouse on say square (1,2) and enter some data, then on square (5,5) and enter data say "4". There is a button in this panel, and which on being clicked, gets the table data and does some operation on it.
    Problem is when i use the "getValueAt" API, it gives correct data for square(1,2) but not for (5,5). This is because the mouse focus is still on square (5,5). However if i focus out of square (5,5) using my mouse (to some other random square) then the data comes up properly. Am i missing something here?
    I understand it is to do with the data model getting altered only when the mouse if focussed out? But this seems to be very trivial. Is there a way of getting the data out without focusing the mouse out of the cell?

    My solution uses a JFrame instead of a JApplet.
    But I think the effect is the same.
    First of all, the setVisible(true) should be put after all components are added.
    Secondly, when you retrieve data in the table, you'd synchronized() the model.
    Thirdly, I didn't find any problem when I call stopCellEditing(). Perhaps I'm using Java 5. Anyway, please try whether the following code works.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.TableModel;
    public class DummyFrame extends JFrame {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        DummyFrame frame = new DummyFrame();
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        frame.pack();
                        frame.setVisible(true);
         public DummyFrame() {
              JTable table = new JTable(9, 9);
              JButton data = new JButton("DATA");
              data.addActionListener(new SimpleButtonListener(table));
              JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              panel.add(table, BorderLayout.CENTER);
              panel.add(data, BorderLayout.SOUTH);
              getContentPane().setLayout(new BorderLayout());
              getContentPane().add(panel);
    class SimpleButtonListener implements ActionListener {
         JTable table;
         public SimpleButtonListener(JTable table) {
              this.table = table;
         public void actionPerformed(ActionEvent e) {
              synchronized (table) {
                   if (table.isEditing()) {
                        System.out.println("Is Editing!");
                        table.getCellEditor(table.getEditingRow(), table.getEditingColumn()).stopCellEditing();
              printArray(getData());
         String[][] getData() {
              synchronized (table) {
                   TableModel model = table.getModel();
                   synchronized (model) {
                        String[][] question = new String[9][9];
                        for (int i = 0; i < 9; i++) {
                             for (int j = 0; j < 9; j++) {
                                  question[i][j] = model.getValueAt(i,j) == null ? null : model.getValueAt(i,j).toString();
                        return question;
         void printArray(String[][] question) {
              int rows = question.length, columns = question[0].length;
              for (int i = 0; i < rows; i++) {
                   for (int j = 0; j < columns; j++) {
                        System.out.println("[" + i + ", " + j + "] -> "
                                  + question[i][j]);
    }And ... please don't forget to give me the 5 Duke dollars if it works.
    Thank you!
    Asuka Kenji (UserID = 289)
    (Duke Dollars Hunting now ...)

  • Problem while tabbing out of a cell

    I have a JTable in which if I enter an invalid data in a particular cell and tab out, after showing the error message the cursor should be brought back to the error cell. I was able to do this with the following code.
    isCellEditable(int row, int col){
    tblDamageDetials.changeSelection(errorRow,errorCol,false,false);
    tblDamageDetials.setEditingColumn(errorCol);
    errorRow and errorCol will have the row and col where the invalid data is present.
    This will act like a lock and will never let u out of the error cell if u tab again. But I want the error message to appear everytime I tab out of the error cell.
    The code to display the error message is invoked from the method setValueAt().
    But the problem is when I try to tab out of the cell again, I'll not be getting the error message again.This is because the setValueAt method will be called only if the cursor is on the celleditor. But the above code will not put the cursor on the editor, instead it will be on the renderer only. So while tabbing the setValueAt will not be invoked.
    I tried bringing the focus to the editor by using tblDamageDetials.editCellAt(erroRow,errorCol);
    Then I am getting StackOverFlow error.
    Could somebody please help me out.

    Thanks for the help.I tried implementing what u told, but still I'm getting StackOverflow exception.I'm getting the exception at editCellAt() method.
    I'll paste my code here.If possible please look into it.
    import javax.swing.*;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.DefaultCellEditor;
    import java.awt.*;
    public class TestTable extends JFrame {
    public static final int firstCol = 0;
    public static final int secondCol = 1;
    public Object[][] tableData = {{"", ""}, {"", ""}};
    public String[] colName = {"First Col", "Second Col"};
    public TableModel tableModel = new TableModel();
    public JTable tblDamageDetials = new JTable(tableModel);
    public int rowSelected = 0;
    private JScrollPane slpDemageDetails = null;
    private JTextField txfDamageComponent = new JTextField();
    private JTextField txfRepair = new JTextField();
    private boolean checkFlag = true;
    private int errorCol = -1;
    private int errorRow = -1;
    MyCellEditor myCellEditor = null;
    TestTable() {
    this.getContentPane().setLayout(new BorderLayout());
    this.getContentPane().add(getslpDemageDetails(), BorderLayout.CENTER);
    private JScrollPane getslpDemageDetails() {
    if (slpDemageDetails == null) {
    createTable();
    return slpDemageDetails;
    public static void main(String args[]) {
    TestTable test = new TestTable();
    test.show();
              test.setVisible(true);
    test.setSize(800, 500);
    class TableModel extends AbstractTableModel {
    public int getColumnCount() {
    return colName.length;
    public int getRowCount() {
    return colName.length;
    public String getColumnName(int col) {
    return colName[col];
    public Object getValueAt(int row, int col) {
    return tableData[row][col];
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    public boolean isCellEditable(int row, int col) {
    if ((errorCol != -1) && (errorRow != -1)) {
    tblDamageDetials.editCellAt(errorRow, errorCol);
    checkFlag = true;
    EventQueue.invokeLater(new Runnable() {
    public void run() {
    myCellEditor = null;
    myCellEditor = (MyCellEditor) tblDamageDetials.getCellEditor(errorRow, errorCol);
    myCellEditor.getTextField().requestFocus();
    return true;
    public void setValueAt(Object value, int row, int col) {
    if (value == null) {
    return;
    tableData[row][col] = value.toString();
    if (col == firstCol) {
    if (checkFlag) {
    checkFlag = validateData();
    if (checkFlag) {
    errorCol = -1;
    errorRow = -1;
    fireTableCellUpdated(row, col);
    public void createTable() {
    tblDamageDetials.getTableHeader().setReorderingAllowed(false);
    tblDamageDetials.setBackground(Color.white);
    tblDamageDetials.setSelectionBackground(new Color(254, 254, 254));
    tblDamageDetials.setRowHeight(20);
    JTableHeader header = tblDamageDetials.getTableHeader();
    Dimension dim = header.getPreferredSize();
    dim.height = 40;
    header.setPreferredSize(dim);
    tblDamageDetials.getColumnModel().getColumn(firstCol).setCellEditor(new MyCellEditor(txfDamageComponent));
    tblDamageDetials.getColumnModel().getColumn(secondCol).setCellEditor(new MyCellEditor(txfRepair));
    ListSelectionModel rowSM = tblDamageDetials.getSelectionModel();
    rowSM.addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) return;
    ListSelectionModel lsm = (ListSelectionModel) e.getSource();
    if (lsm.isSelectionEmpty()) {
    rowSelected = -1;
    return;
    } else
    rowSelected = lsm.getMinSelectionIndex();
    slpDemageDetails = new JScrollPane(tblDamageDetials);
    slpDemageDetails.setName("slpDemageDetails");
    dim = new Dimension(454, 500);
    slpDemageDetails.setPreferredSize(dim);
    slpDemageDetails.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    slpDemageDetails.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    } /* End of createTable method */
    private boolean validateData() {
    boolean checkFlag = true;
    int size = tblDamageDetials.getRowCount();
    for (int i = 0; i < size; i++) {
    if ((checkFlag) && (getParseFloat(tableData[i][firstCol].toString().trim()) == 0)) {
    JOptionPane.showMessageDialog(null, "invalid data");
    checkFlag = false;
    errorCol = firstCol;
    errorRow = i;
    return checkFlag;
    public float getParseFloat(String value) {
    float retValue = 0.0f;
    try {
    retValue = Float.parseFloat(value);
    } catch (NumberFormatException e) {
    retValue = 0.0f;
    return retValue;
    } /* End of getParseFloat method */
    class MyCellEditor extends DefaultCellEditor {
    private JTextField tf;
    public MyCellEditor(JTextField text) {
    super(text);
    tf = (JTextField) editorComponent;
    public JTextField getTextField() {
    return tf;
    Hope somebody will be able to help me.
    Thanks,
    Ashey

  • Setting Focus to a particular cell in JTable

    Hi, can i know how to set the focus to a particular cell in JTable.
    Say I have a table with 2 rows and 10 columns. The focus now is at position (1, 9) which is the last cell in the table. But I want to set the focus to (1, 3). How can i achieve this ? Pls help. Thanks

    OK. It's partially working. The right methods to use are setRowSelectionInterval and setColumnSelectionInterval. Jeanette was right. Mine didn't work because of a thread issue. I put the those two methods in a block such as:
    SwingUtilities.invokeLater(new Runnable(){
    public void run()
    table.setRowSelectionInterval(tblLineItem.getRowCount()-1,
    table.getRowCount()-1);
    table.setColumnSelectionInterval(0,0);
    Then it worked.
    But after I finished editing the first cell of the newly created row and press ENTER, the selection went back to the cell that's next to the originally editing cell on the first(old) row, instead of staying at the current row and going to the second cell.
    Can anybody shed a light on what I'm missing?

  • How to enter a value into datagrid cell in wpf through manually?

    Hi,
        Here my datagrid rows are in readonly mode here how can i enter the values in to the datagrid cell.(means how can i edit the cell value).i am adding the value to datagrid through programetically, I think  for this reason my datagrid rows
    are visible in readonly mode. Then how can i edit. Please guide me.
    Regards,
    Bhadram

    Hi Barry,
       Thank you for your reply, Now i sending my sample please check it once and suggest me.
    MainWindow.xaml.cs
    private void Save_Click(object sender, RoutedEventArgs e)
     List<CustomerMainViewModel> customer = new List<CustomerMainViewModel>(); customerviewmodel.NameTextField = tbName.Text;
    customerviewmodel.AddressTextField = tbAddress.Text;
    customerviewmodel.CountryField = countryddl.Text;
    customerviewmodel.StateField = stateddl.Text;
    customerviewmodel.Product = customerviewmodel.Product1 + "," + customerviewmodel.Product2;
    foreach(string str in customerviewmodel.actionCollection)
    customerviewmodel.ActionColl.Add(str);
    customerviewmodel.actionCollection.Clear();
    customer.Add(customerviewmodel);
    dataGrid1.Items.Add(customer);
    MessageBox.Show("Data Successfully Saved", " MessageBox", MessageBoxButton.OK, MessageBoxImage.Asterisk);
    clearValues();
    MainWindow.xaml
    <DataGrid
    Height="144"
    HorizontalAlignment="Left"
    Margin="79,447,0,0"
    Name="dataGrid1"
    VerticalAlignment="Top" CanUserAddRows="True"
    Width="399" Grid.RowSpan="2" IsReadOnly="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="NAME" Binding="{Binding NameTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False" />
    <DataGridTextColumn Header="ADDRESS" Binding="{Binding AddressTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="GENDER" Binding="{Binding GenderField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="COUNTRY" Binding="{Binding CountryField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="STATE" Binding="{Binding StateField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="PRODUCT" Binding="{Binding Product,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTemplateColumn Header="ACTION" MinWidth="140" IsReadOnly="False">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <ComboBox x:Name="actionddl" ItemsSource="{Binding ActionColl}"/>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>
    </DataGrid.Columns>
    </DataGrid>
    In the above "xaml" file i am using the attribute "Readonly="False"" but its not effected on my code still my datagrid is in readonly mode, i don't know why it happens. 
    And I am adding data to my datagrid through "Wpf controls (TextBox,CheckBox,ComboBox and etc...)"  while click on "save" button the data added to grid. adding to grid works properly but the entire row is in readonly mode. How can
    i solve my problem.  

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • How to prevent flushing out the value in Select one choice on page refresh

    Hi All,
    I am using Jdeveloper 11.1.1.4.0. In my page fragment I am using select one choice ADF component. I have a requirement that unless one fills all details on 1st fragment he/she cant move to next fragment.
    So validations are there to check that mandatory fields filled or not. If not than I am showing message to fill the mandatory fields when user press on "Review " Button.
    But the value in select one choice is getting cleared while other input values like date fields or input text are not(The input information stored in static variables)
    How can I prevent flushing out of select one choice value .
    Thanx
    kanika

    Kanika,
    You don't have value property set due to which the selected value doesn't get stored and looses its value on refresh.
    When you drop attribute as select one choice on page, the value property get bounded to some value, did you remove it intentionally?
    If so, can you try keeping the property and see if you see the intended behavior?
    Sireesha

  • Moive clip in dataGrid cell.

    I want to put a movie clip into datagrid cell
    and cell data will change the color of the movie clip.
    how could I do that?
    pls help

    I think, you can use cellRenderer.
    If you want add icon something like that means, you can use
    "setPropertiesAt"

  • Combobox behavior inside a datagrid cell

    How do you control the width of a combobox that resides
    inside a datagrid cell? Merely setting cb.dropdownWidth = "some
    value" does not work.

    ok.. i got it. You can successfully modify
    dropdownWidth from withing your CellRenderer class using the 'open'
    event.

  • Enlarging a Flex DataGrid cell on RollOver

    Hi, I have a DataGrid which has a column named Hyperlinks where I show useful hyperlinks for the user. Sincce typically Hyperlinks are too big to show in a DataGrid cell, I need to have the column width at max 100px to be able to fit other columns in the Grid.
    What I am looking for is a way to show content of the cell when the user mouse over the cell. May be when user rollover, the cell shows the content increasing its size overlapping on the adjucent cells.
    Can anyone pls give me some suggestion on this? a code snippet would be very helpful if possible...
    Thanks in advance, Bose.

    Hi
    Instead of enlarging a cell you can display data using showDataTips="true" for the respective column.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" minWidth="955" minHeight="600" applicationComplete="initData()">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                private var DGArray:Array = [
                    {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
                    {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99}];
                [Bindable]
                public var initDG:ArrayCollection;
                public function initData():void {
                    initDG=new ArrayCollection(DGArray);
            ]]>
        </fx:Script>
        <mx:DataGrid id="myGrid" dataProvider="{initDG}" >
            <mx:columns>
                <mx:DataGridColumn dataField="Album" dataTipField="Album" showDataTips="true" />
                <mx:DataGridColumn dataField="Price" />
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • I changed out my old cell phone for a Motorola zoom and now the zoom has my old phone number associated with it's sim card. I just purchased a Samsung Android cell phone and would like to trade the sim from my new to cell to the zoom so I can have my old

    I changed out my old cell phone for a Motorola zoom and now the zoom has my old phone number associated with it's sim card. I just purchased a Samsung Android cell phone and would like to trade the sim from my new to cell to the zoom so I can have my old cell phone number back. The problem is the sim cards are different sizes. Is this something I can take to a store and get switched out?

    SRCLARK,
    Great question! You can go to the store and get a replacement SIM card at the store. Any corporate store will be more than happy to help replacing your card. http://bit.ly/3SdsA
    RobinD_VZW
    Follow us on twitter @VZWSupport

Maybe you are looking for

  • Error creating GUI for dmardemo.java

    Hi friends! I took the demo dmardemo.java (Association Rules) which comes with the ODM for Java to test Data Mining function in the sample database Sales History. In the original code, the application ran normally. However, I'm trying to create a GUI

  • Connection video to tv

    hi,      i am using Mx440-T8X GeForce 4. There is a TV output connector (S video). I did connect it to my tv but the display is still in monitor, how do i get this display on my tv? pls help . Thanks

  • How do i restore systems preferences to a mac osx 10.5.8

    somehow my system pref..app has been removed from my mac..got a new printer and cannot install anything..any suggestions

  • File datalog type conflict???

    Bonjour, j'ai quelques soucis sur Labview dont je n'arrive pas a résoudre!!! J'ai réaliser un vi qui permet de lire des données dans un fichier .rdt. Par contre, j'ai le code d'erreur 71 "File datalog type conflict" qui s'affiche et je ne sais pas co

  • Dv5-1126em Entertainment Notebook PC IDT High-Definition Audio CODEC Driver can not be updated

    dv5-1126em Entertainment Notebook PC IDT High-Definition Audio CODEC Driver can not be updated the system says that your computer has a sound device problem and cant play multiple sound in my pc