rullomare Posted August 9, 2014 Posted August 9, 2014 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 BMUniDBGrid.zip 1 7 Quote
csyasar Posted August 12, 2014 Posted August 12, 2014 code: procedure JSEventHandler(AEventName:String;AParams:TUniStrings);override; d2010 error: [DCC Error] BMUniDbGrid.pas(93): E2003 Undeclared identifier: 'TUniStrings' Quote
rullomare Posted August 12, 2014 Author Posted August 12, 2014 Hi csyasar , pls Unigui and delphi version ? Regards Quote
rullomare Posted August 13, 2014 Author Posted August 13, 2014 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 Quote
Jean-Marc Kiener Posted September 11, 2014 Posted September 11, 2014 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 Quote
rullomare Posted September 11, 2014 Author Posted September 11, 2014 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; Quote
rullomare Posted September 11, 2014 Author Posted September 11, 2014 Hi Kiener , I hope have everything posted. let me know if it worked. Demoaction.zip Regards. Quote
Jean-Marc Kiener Posted September 12, 2014 Posted September 12, 2014 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. Quote
rullomare Posted September 12, 2014 Author Posted September 12, 2014 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 Quote
rullomare Posted September 13, 2014 Author Posted September 13, 2014 Hi Kiener, My Problem !!! Sorry. replaces the file BMUnidbgrid.pas and rebuild the package . BMUnidbgrid_pas.zip Let me know if it works. Regards. Quote
Jean-Marc Kiener Posted September 15, 2014 Posted September 15, 2014 Hi rullomare, It works great now, thanks! Quote
ganzqgy Posted September 15, 2014 Posted September 15, 2014 xe2 not work! RawValue := RawValue.Remove(RawValue.Length - 1);???? Vals := Vals.Replace(']', '');??? ArrayOfIndex := Vals.Split([',']);??? Quote
rullomare Posted September 15, 2014 Author Posted September 15, 2014 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 Quote
rullomare Posted September 15, 2014 Author Posted September 15, 2014 Hi ganzqgy, see previous post. let me know if it works. Regards Quote
ganzqgy Posted September 16, 2014 Posted September 16, 2014 ts.CommaText := Vals ; SetLength(ArrayOfIndex, ts.Count); for x := 0 to ts.Count- 1 do begin ArrayOfIndex[x] := ts.Strings[x] ; end; ts.free ; OK!Thanks Quote
ganzqgy Posted September 18, 2014 Posted September 18, 2014 JSObjects.JSClasses['pagingBar'] := 'Ext.toolbar.Paging'; Quote
rullomare Posted September 18, 2014 Author Posted September 18, 2014 Hi ganzqgy, Good idea. Thanks! Quote
gpaulino Posted September 18, 2014 Posted September 18, 2014 [dcc32 Error] BMUnidbgrid.pas(258): E2003 Undeclared identifier: 'jsgridpanel' in Unigui 0.95 help??? Quote
rullomare Posted September 18, 2014 Author Posted September 18, 2014 Hi , change jsgridpanel in ExtGridPanel . Regards Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.