Vision Posted December 8, 2018 Share Posted December 8, 2018 Hi i need to disable the option in the right of a dbgrid column. How can I do it? tanks a lot Cris Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2018 Share Posted December 8, 2018 Hi, UniDBGrid -> Columns[xx] -> Menu -> MenuEnabled = False Link to comment Share on other sites More sharing options...
Vision Posted December 8, 2018 Author Share Posted December 8, 2018 Hi I need to do it in run time. in onafterload (tunidbgrid) not work. tip? Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2018 Share Posted December 10, 2018 On 12/8/2018 at 11:02 PM, cristian said: I need to do it in run time. in onafterload (tunidbgrid) not work. Hi, Do you want this action for all columns simultaneously, or just for a specific column ? Link to comment Share on other sites More sharing options...
Vision Posted December 12, 2018 Author Share Posted December 12, 2018 Hi I just need to disable this feature to all column. Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2018 Share Posted December 16, 2018 On 12/13/2018 at 2:44 AM, cristian said: Hi I just need to disable this feature to all column. Hi, One possible solution: type TExUniCustomDBGrid = class (TUniCustomDBGrid) end; procedure TMainForm.UniButton1Click(Sender: TObject); var I: Integer; begin for I := 0 to UniDBGrid1.Columns.Count-1 do UniDBGrid1.Columns[I].Menu.MenuEnabled := False; TExUniCustomDBGrid(UniDBGrid1).DoConfigureJSColumns(UniDBGrid1.DataSource.DataSet); end; Link to comment Share on other sites More sharing options...
Vision Posted December 17, 2018 Author Share Posted December 17, 2018 22 hours ago, Sherzod said: Hi, One possible solution: type TExUniCustomDBGrid = class (TUniCustomDBGrid) end; procedure TMainForm.UniButton1Click(Sender: TObject); var I: Integer; begin for I := 0 to UniDBGrid1.Columns.Count-1 do UniDBGrid1.Columns[I].Menu.MenuEnabled := False; TExUniCustomDBGrid(UniDBGrid1).DoConfigureJSColumns(UniDBGrid1.DataSource.DataSet); end; Perfect! Tnks so much again Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now