Hi,
I send you as Att  mfm file as abstract, try to have a look if you have time.
The Onactivate event is
procedure tfrmbasefo.OnActivate(const sender: TObject);beginif sender is 
tdbwidgetGrid  then  
ds.dataset:=tdbwidgetGrid(sender).datalink.datasource.dataset ;else 
ds.dataset:=tdataset(tdbpanel(sender).datasource.dataset);end;
ps:
ds  -->  tdbnavigator.datasource
T
> From: [email protected]
> To: [email protected]
> Date: Tue, 1 Sep 2015 17:57:03 +0200
> Subject: Re: [MSEide-MSEgui-talk] TdbNavigator
> 
> On Tuesday 01 September 2015 10:30:44 mohamed hamza wrote:
> > Hi Martin,
> >
> >      I have no problem adding record to tdbnavigator.datasource.dataset
> > which is selected by the user.
> >
> > But I do not want to add record to tdbwidgetgrid.datasource.dataset  until
> > the user select the tdbwidgetgrid .
> >
> > I think you understand the problem.
> >
> No, I don't sorry.
> tdbnavigator.datasource.dataset and tdbwidgetgrid.datasource.dataset are the 
> same?
> 
> Martin
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> mseide-msegui-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
                                          
inherited frmtiersfo: tfrmtiersfo
  color = -2147483646
  bounds_x = 329
  bounds_y = 130
  bounds_cx = 823
  bounds_cy = 518
  container.bounds = (
    0
    0
    823
    518
  )
  caption = 'TIERS'
  moduleclassname = 'tfrmbasefo'
  inherited tsimplewidget1: tsimplewidget
    taborder = 2
    bounds_cx = 731
    bounds_cy = 58
    inherited tdbnav1: tdbnavigator
      bounds_x = 287
      bounds_y = 24
      bounds_cx = 240
      dialogbutton.state = [as_disabled, as_invisible, as_localdisabled, 
as_localinvisible, as_localimagelist, as_localimagenr, as_localcolorglyph, 
as_localhint]
    end
    inherited saveBtn: tstockglyphbutton
      bounds_x = 586
      bounds_y = 24
      bounds_cy = 20
    end
    
    
  end
  object TDBPanel1: TDBPanel[1]
    frame.framewidth = 1
    frame.colorframeactive = -1610612726
    frame.localprops = [frl_framewidth, frl_colorframeactive]
    frame.dummy = 0
    onactivate = OnActivate
    visible = True
    bounds_x = 3
    bounds_y = 68
    bounds_cx = 514
    bounds_cy = 309
    DataSource = DM01mo.DS04

    object tdbmemoedit1: tdbmemoedit
      frame.levelo = 1
      frame.sbhorz.pagesize = 1
      frame.sbvert.pagesize = 1
      frame.caption = 'MEMO'
      frame.font.height = 10
      frame.font.name = 'stf_courier'
      frame.font.xscale = 1
      frame.font.dummy = 0
      frame.localprops = [frl_levelo, frl_framewidth, frl_colorclient]
            frame.outerframe = (
        0
        14
        0
        0
      )
      bounds_x = 4
      bounds_y = 89
      bounds_cx = 494
      bounds_cy = 70
      textflags = [tf_wordbreak, tf_noselect]
      textflagsactive = [tf_wordbreak]
      datalink.datasource = DM01mo.DS04
      datalink.fieldname = 'MEMO'
      reffontheight = 14
    end
   
    
  end
  object tdbwidgetgrid1: tdbwidgetgrid[2]
    frame.levelo = -1
    frame.framewidth = 2
    frame.colorframeactive = -1610612727
    frame.frameimage_offsetmouse = 23
    frame.frameimage_offsetactive = 8
    frame.frameimage_offsetactivemouse = 24
    frame.frameimage_offsetactiveclicked = 16
    frame.options = [cfo_captionfocus]
    frame.sbvert.pagesize = 1
    
    frame.captiondist = 0
    frame.font.colorbackground = -1610612716
    frame.font.height = 14
    frame.font.style = [fs_bold]
    frame.font.name = 'stf_default'
    frame.font.xscale = 1
    frame.font.dummy = 0
    frame.localprops = [frl_levelo, frl_framewidth, frl_colorframe, 
frl_colorframeactive, frl_frameimagelist, frl_frameimageoffsetmouse, 
frl_frameimageoffsetactive, frl_frameimageoffsetactivemouse, 
frl_frameimageoffsetactiveclicked, frl_colorclient]
    frame.localprops1 = [frl1_captiondist]
    frame.outerframe = (
      0
      18
      0
      0
    )
    taborder = 1
    onactivate = OnActivate
    bounds_x = 518
    bounds_y = 68
    bounds_cx = 269
    bounds_cy = 310
    fixcols.count = 1
    fixcols.items = <    
      item
        width = 15
      end>
    fixrows.count = 1
    fixrows.items = <    
      item
        height = 16
        captions.count = 4
        captions.items = <        
          item
            caption = 'Npi'#233'ce'
          end        
          item
          end        
          item
          end        
          item
            caption = 'Date'
          end>
      end>
    datacols.count = 4
    datacols.items = <    
      item[tdbintegeredit1]
        width = 58
        widgetname = 'tdbintegeredit1'
      end    
      item[tdbintegeredit2]
        widgetname = 'tdbintegeredit2'
      end    
      item[tdbintegeredit3]
        widgetname = 'tdbintegeredit3'
      end    
      item[tdbintegeredit4]
        widgetname = 'tdbintegeredit4'
      end>
    datalink.datasource = DM01mo.DS05  
    datarowheight = 16
    reffontheight = 14
     end
  inherited ds: tmsedatasource[3]
    AutoEdit = False
    DataSet = DM01mo.Msetiers
    left = 264
    top = 264
  end
end
------------------------------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to