Jump to content


Photo

DBGRID Action Columns at Design Time

DBGRID ACTION Columns Design

  • Please log in to reply
61 replies to this topic

#1 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 09 August 2014 - 01:22 PM

Hi,
 
Variant of the component Tunidbgrid with Columns Action At design time. 
 
This new component is the result of a collaboration between myself and Mr. Maikel Bresler. 
 
the component has been tested with version 0.96... of UniGui and Delphi XE3. 
 
I do not think that there are problems with other versions of Delphi. 
 
installation: 
 
package BMUiniDbGrid;
   ..........
   .........
 
requires
  rtl,
  vcl,
  UniGUI17;   // unigui17 = delphi XE3    >>>  Change the package Unigui17 with your version of Delphi                 
  ..........
  ..........
  .......... 
 
 
Build and install the  package BMuniDBGrid.dpk 
 
Add the Path (dcu) in Delphi>Tools>Delphi Options>Library 
 
Have Fun. 
 
 
P.Š. if you need a demo program, please let me know. 
 
 
with best regards 
 
Salvatore Marullo

Attached File  Sample1.png   174.45KB   531 downloadsAttached File  Sample2.png   177.87KB   570 downloadsAttached File  sample3.png   150.21KB   543 downloadsAttached File  Sample4.png   416.06KB   531 downloadsAttached File  Sample5.png   357.11KB   467 downloadsAttached File  Sample6.png   384.9KB   319 downloads

 

Attached File  BMUniDBGrid.zip   4.77KB   245 downloads

 

 


  • 7

#2 majori

majori

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 125 posts

Posted 09 August 2014 - 08:24 PM

tnx , great word.


  • 0

#3 billyChou

billyChou

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 124 posts

Posted 11 August 2014 - 01:24 AM

Thanks


  • 0

#4 csyasar

csyasar

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 74 posts

Posted 12 August 2014 - 02:21 AM

code:

procedure JSEventHandler(AEventName:String;AParams:TUniStrings);override;

 

 

d2010 error:

[DCC Error] BMUniDbGrid.pas(93): E2003 Undeclared identifier: 'TUniStrings'


  • 0

Ungui ile Delphi yeniden doğdu.

Means: Delphi was born again with unigui


#5 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 12 August 2014 - 07:01 AM

Hi  csyasar ,

 

 

pls  Unigui  and  delphi version  ?

 

 

 

Regards 


  • 0

#6 csyasar

csyasar

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 74 posts

Posted 12 August 2014 - 04:26 PM

delphi 2010. unigui 0.96


  • 0

Ungui ile Delphi yeniden doğdu.

Means: Delphi was born again with unigui


#7 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 13 August 2014 - 07:36 AM

Hi Csyasar, 
 
Tunistrings (I believe) is defined Uniguitypes.dcu also in Delphi10. 
 
Only for a test, 
Please copy UniguiTypes.dcu from ... \ FMsoft \ Framework \ unigui \ dcu \ delphi10 
 
in the directory where the package BMuniDBGrid.dpk is located. 
 
Build and install the package. 
 
Is working, you have a problem with delphi path: in Delphi see Tools.Options.Delphi Options.libary

 

Regards

 

Salvatore Marullo


  • 0

#8 Fenix

Fenix

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 260 posts
  • LocationBrazil

Posted 15 August 2014 - 10:20 PM

Thanks


  • 0
Delphi Berlin
uniGui 1.0.0.1410
Windows Server 2012 64bit IIS

#9 Kiener

Kiener

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 146 posts
  • LocationSwitzerland

Posted 11 September 2014 - 02:14 PM

Hi,

 

I try to get it run without success. I've installed the TBMDBUniGrid without problems. I followed the pictures in the forum post to set up a button column. On Runtime, i can see the button column, thats fine. But if click on it, the OnButtonAction is never fired. I leave the OnActionColumnEvent property blank. maybe that is the problem?

 

Maybe a little demo program would help me.

 

Thanks in advance


  • 0

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.

 

Albert Einstein


#10 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 11 September 2014 - 02:53 PM

Hi Kiener , 

 

yes, this is the problem. 
 

at the moment  are busy . 

 

Later   I will post  you a demo. 

 

Regards. 

 

 

 

 

 

procedure TMainForm.gridButtonAction(Sender: TObject; ButtonEvent: string);
begin
   memo.Lines.Add('Clik :  ' +  ButtonEvent )  ;
end;

  • 0

#11 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 11 September 2014 - 03:24 PM

Hi Kiener , 

 

 

I hope  have everything posted. 

 

let me know if it worked.

 

Attached File  Demoaction.zip   226.86KB   135 downloads

 

 

Regards. 

 

 

 

 

 

 

 

 


  • 0

#12 Kiener

Kiener

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 146 posts
  • LocationSwitzerland

Posted 12 September 2014 - 02:21 PM

Hi rullamore,

 

First i have to thank you for the quick demo. I studed it and saw... there is no difference to my project. Hmm... the only difference was, that my grid was on a TuniPanel. So i set the grid directly to the form and.. it works!

So i changed your demo project in that way. I placed a TuniPanel on the form and set the grid into it. Now, even the demo project did not fire the OnButtonAction event.

 

Seems to be an issue.

 

Regards.


  • 0

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.

 

Albert Einstein


#13 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 12 September 2014 - 04:46 PM

Hi Kiener,

 

I think I understand the problem. 
 
At the moment I do not know if it a (my)  component  problem or a Unigui Problem. 
 

I'll let you know as soon as possible.

 

 Regards 

  • 0

#14 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 13 September 2014 - 01:11 PM

Hi Kiener, 

 

My Problem !!!  Sorry.

 

replaces the file  BMUnidbgrid.pas and  rebuild the package .
 
Attached File  BMUnidbgrid_pas.zip   3.88KB   99 downloads
 
Let me know if it works.

 

 

Regards. 

 

 

 

 

 


  • 0

#15 Kiener

Kiener

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 146 posts
  • LocationSwitzerland

Posted 15 September 2014 - 05:44 AM

Hi rullomare,

 

It works great now, thanks!


  • 0

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.

 

Albert Einstein


#16 ganzqgy

ganzqgy

    Advanced Member

  • Members
  • PipPipPipPip
  • 143 posts

Posted 15 September 2014 - 09:23 AM

xe2 not work!

RawValue := RawValue.Remove(RawValue.Length - 1);????

Vals := Vals.Replace(']', '');???

ArrayOfIndex := Vals.Split([',']);???


  • 0

#17 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 15 September 2014 - 11:47 AM

Hi ganzqgy, 

 

 
Not tested in Delphi XE2. 
 
Maybe you can help.
 
===============================
procedure TBMUniDBGrid.JSEventHandler(AEventName: String;
  AParams: TUniStrings);
  var
    Vals: String;
    ArrayOfIndex: TArray<String>;
    I: Integer;
    CurrentPos: TBookmark;
    
 
 
    var Ts : Tstrings ;  // New XE2
    x         : integer ;   // New XE2
 
begin
  inherited;
 
  if SameText (AEventName,FActionColumnEvent)  then begin
      if assigned(Self.OnButtonAction) then
      self.OnButtonAction(self,AParams.Values['Buttons']) ;
 
  end
  else  if SameText (AEventName,'SelectedRows') then begin
      try
        SelectedRows := strtoint(AParams.Values['RowsCount']);
      except
          SelectedRows := 0 ;
      end;
  end
 
  else if  sametext(AEventName,'selectionchange') then
  begin
    Self.FSelectionListObject.RawValueOfIndex := AParams.Values['ArrayOfIndex'];
    Vals := Self.FSelectionListObject.RawValueOfIndex;
 
    // Vals := Vals.Replace('[', '');
    // Vals := Vals.Replace(']', '');
 
    Vals :=   StringReplace( Vals, '[', '', [RfReplaceAll] );    // XE2
    Vals :=   StringReplace( Vals, ']', '', [RfReplaceAll] );    // XE2
 
   // ArrayOfIndex := Vals.Split([',']);
 
 // XE2 
    Ts := Tstringlist.Create ;
    ts.Delimiter := ',' ;
    ts.DelimitedText := Vals ;
 
   SetLength(ArrayOfIndex, ts.Count);           //   added by mr. ganzqgy  

 

 

 

    for x  := 0 to ts.Count- 1 do begin
 
      ArrayOfIndex[x] := ts.Strings[x] ;
    end;
    Ts.free 
  // XE2

 .......

........

 

 

 

Regards 

 

 

 

 

 

 

 


  • 0

#18 rullomare

rullomare

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 132 posts
  • LocationItaly

Posted 15 September 2014 - 11:47 AM

Hi ganzqgy, 

 

 
 
 see previous post.

 

 

let me know if it works.

 

 
Regards

  • 0

#19 ganzqgy

ganzqgy

    Advanced Member

  • Members
  • PipPipPipPip
  • 143 posts

Posted 15 September 2014 - 11:59 PM

Thanks.

 

error:


  • 0

#20 ganzqgy

ganzqgy

    Advanced Member

  • Members
  • PipPipPipPip
  • 143 posts

Posted 16 September 2014 - 12:00 AM

Thanks.

 

error:

Attached Files


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users