delphi - cxgrid popup menu paste value of popupmenuitem -
in tms string grid used use paste caption of popup menu grid's cell :
var s:string; begin s:=(sender tmenuitem).caption; s:=stringreplace(s,'&','',[rfreplaceall]); advstringgrid1 cells[col,row]:=s; i never used before in cxgrid totally new this. have linked cxgridpopupmenu1 grid,added classic popupmenu gets used cxgridpopupmenu1,added items in popup menu , thats it. popup menu fires on right click in grid ok, how paste value of menuitem cell?? + there way assign popopmenu particular column ?
i'd this:
procedure tform1.menuitem1click(sender: tobject); var s: string; begin assert(sender tmenuitem); s := striphotkey(tmenuitem(sender).caption); cxgrid1tableview1.datacontroller.edit; cxgrid1tableview1.controller.focusedcolumn.editvalue := s; end;
Comments
Post a Comment