Results 1 to 4 of 4

Thread: Popping a BasicDialog when Gridrow click

  1. #1

    Default Popping a BasicDialog when Gridrow click

    hi,
    there is a same issue here:
    http://www.extjs.com/forum/showthread.php?t=866

    but i could not do that.
    i have a grid and want to open the dialog window when a row clicked. code is below. i'm getting
    Code:
    Ext.BasicDialog is not a constructor
    error.


    Code:
    Ext.onReady(function () {
    ...
    ...
    var grid = .....
    ....
    grid.addListener("rowclick", yaziyiGoster);
    
    var dialog = new Ext.BasicDialog("comments-dlg", { 
                    autoTabs:true,
                    width:500,
                    height:300,
                    shadow:true,
                    minWidth:300,
                    minHeight:300
                });
                dialog.addButton('Close', dialog.hide, dialog);
                dialog.hide();
    
    });
    
    function yaziyiGoster()
    {
        var selectionModel = Ext.getCmp('gridMakaleler').getSelectionModel();
        var record = selectionModel.getSelected();
        //var id = grid.getDataModel().getRowId(rowIndex);
        dialog.show();
    
    };
    there is a div called "comments-dlg" in my aspx page.
    Code:
    <div id="comments-dlg" style="width: 100%; height:100%;"></div>

    if i'll open the dialog window, i'll change it's innerHTML but could not open it.
    regards.

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    I'm guessing that you're trying to use ExtJS 1.x code in 3.x??? See: http://www.extjs.com/learn/Ext_1_to_...alog_to_Window

  3. #3

    Default

    Quote Originally Posted by fay View Post
    I'm guessing that you're trying to use ExtJS 1.x code in 3.x??? See: http://www.extjs.com/learn/Ext_1_to_...alog_to_Window

    yeah you're right. thanks fay.
    Last edited by zamkinos; 17 Mar 2010 at 5:54 AM. Reason: another problem

  4. #4

    Default

    when i click a gridrow, window opens. but when i'm closing it
    i'm getting 'undefined variable' error in internet explorer 8 but not in firefox.(in ext-all-debug.js)
    rowclick function calls another(yaziyiGoster). is this the problem?
    how can i solve this?

    Code:
    Ext.onReady(function () {
    ......
    grid.addListener("rowclick", function(grid, rowIndex, e){
    yaziyiGoster(grid, rowIndex)}, grid);
    ......
    });
    function yaziyiGoster(pGrid, pRowIndex)
    {
        alert(pGrid.store.getAt(pRowIndex).get('makaleId'));
            if(win.hidden)   
            win.show(this);
    };

    thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •