-
Posts
19706 -
Joined
-
Last visited
-
Days Won
637
Content Type
Profiles
Forums
Events
Posts posted by Sherzod
-
-
instead, use this UniEvent
function OnBeforeInit(Sender)
{
Ext.Apply(sender, { emptyText: 'text to display when the field is empty' });
}
Hi estrify.
Thank you.
With all due respect to you.
Since I got error, I corrected your code.
Sender to sender
Apply to apply
function OnBeforeInit(sender) { Ext.apply(sender, { emptyText: 'text to display when the field is empty' }); }
Sincerely.
-
source is in place where in unidbgrid? helpme?Duser
For example:
.... uses uniGUIApplication, .... .... procedure TMainForm.UniButton1Click(Sender: TObject); var newpageSize: String; begin newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();'); end;
Best regards
-
Hi nim.
Try this
newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();');
Best regards
- 1
-
-
Hi Kanatshym.
A solution using jquery:
1. You need to download file jquery. Paste the file to folder (.....\files\), connect jquery (ServerModule -> CustomFiles -> add files/jquery-1.3.2.min.js)
2. Add in the form UniHTMLFrame.
3. In the OnCreate form add the following code:UniHTMLFrame1.HTML.Add ('<script>' + '$(".x-grid-view").css("overflow-y", "hidden");' + '$("#' + UniScrollBox1.JSName + '_id-body").scroll(function(){' + '$(".x-grid-view").scrollTop($("#' + UniScrollBox1.JSName + '_id-body").scrollTop());})' + '</script>');
Used only one UniDBGrid.
Sincerely ...
-
Hi Kanatshym.
You have found a solution? -
Hi Farshad.
Can you add in the next version or future, list of allowed IP, including with the ability to specify a range of IP addresses.
Thank you. -
Hi Farshad.
What is DefaultFloatFormat in UniDBGrid WebOptions and how to use?
Thanks... -
Hi Kanatshym.
Sorry, so far I do not have any solutions.I'll try. If things turn out I'll post...
Sincerely ... -
Hi patmap.
Incorrect event handlers when inserting components (I tried it with components UniDateTimePicker, UniComboBox, UniXComboBox) in UniXPanel.
Not working correctly event OnSelect, OnChange ... (Other events are not tested)UniXPanel version: 5.6.0
XComponents: v5.9.2
Embarcadero® Delphi® XE2 Version 16.0.4504.48759
Windows 7 Ultimate
UniGUI v0.93
FF 21.0
Sincerely.
-
But now another problem appeared to do simultaneous skrolining unidbrid and scroll box.
Hi Kanatshym.
Sorry if I misunderstood the question.
If you need scrolling to the grid can use the following code:
UniButton1.ClientEvents.ExtEvents.Values ['OnClick'] := 'function OnClick (sender, e) {MainForm.UniDBGrid1.scrollByDeltaX (10); MainForm.UniDBGrid1.scrollByDeltaY (10);}';
Best regards.
-
Hi Kanatshym.
To start such a decision. Maybe there are other solutions.
Try this:
Add the button to the form UniButton1.procedure TMainForm.UniFormCreate (Sender: TObject); begin UniButton1.ClientEvents.Enabled := True; UniButton1.ClientEvents.ExtEvents.Values ['OnClick'] := 'function OnClick (sender, e) {MainForm.UniScrollBox1.body.dom.scrollTop = 100; MainForm.UniScrollBox1.body.dom.scrollLeft = 100;}'; end; procedure TMainForm.UniButton1Click (Sender: TObject); begin // end;
Will Scroll the body down and right by 100 pixels.
tested in FF.
Best regards.
- 1
-
Hi,
What's the problem?
UniMainMenu1.ScreenMask.Enabled:=True;
For me it works fine.
Hi Semper.
This possibility has been included in the version 0.93.0.996.
0.93.0.996 +----------------------------------------------------------------------------------------
- 0000889: ScreenMask for UniMainMenu events.
The question I asked earlier.
Best regards.
-
Hi Roberto.
Try, can will help you...
type TMyForm = class (TUniForm) ...... ...... procedure MyAjaxEvent (Sender: TComponent; EventName: string; Params: TStrings); ...... TMyForm.MyAjaxEvent procedure (Sender: TComponent; EventName: string; Params: TStrings); begin if EventName = 'myAjaxEvent' then begin (Sender as TUniLabel). Width: = StrToInt (Params.Values ['Width']); end; end; procedure TMyForm.UniFormCreate (Sender: TObject); var oMyLabel: TUniLabel; begin oMyLabel := TUniLabel.Create (Self); with oMyLabel do begin Parent := Self; Name := 'XoMyLabel'; OnAjaxEvent := MyAjaxEvent; oMyLabel.ClientEvents.Enabled := True; oMyLabel.ClientEvents.ExtEvents.Values ['onresize'] := 'function (sender, adjWidth, adjHeight, rawWidth, rawHeight) {ajaxRequest (MyForm.XoMyLabel,'' myAjaxEvent'', ['' Width ='' + adjWidth] )}'; AutoSize := True; oMyLabel.Caption := 'Hi World!'; Top := 10; Left := 10; end; // Right here to get the value of width can not succeed ... end; procedure TMyForm.UniButton1Click (Sender: TObject); begin ShowMessage (IntToStr ((Self.FindComponent ('XoMyLabel') as TUniLabel). Width)); end;
Sincerely
-
How can I save a null value with the TUniDBNumberEdit?
hi Dsciral.
try this
add to designtime UniDBNumberEdit1 -> ClientEvents -> ExtEvents
function OnKeyup (sender, e){ if (sender.getValue() == null) { sender.setValue(0); } }
I hope that will help...
-
Hi All!
How about a theme extjs-theme-bootstrap?https://github.com/NewbridgeGreen/extjs-theme-bootstrap
http://twitter.github.io/bootstrap/base-css.html
Has anyone used this themes?
Thanks... -
Dear Farshad.
With all due respect, I have a question for you.
You yourself are using UniGui, in some your projects. If yes, can you give a link or can share the business logic of your projects (in general terms).
Thank you very much.
Sincerely duser. -
Dear estrify.
I think that this is not a bug (since this post is located in the Bug Reports), sometimes useful such event.
I think just have to add in the future is another event onChangeXXX (onChangeXXX is fired when the input looses focus).
Sincerely duser. -
Numberedit can only save numbers.
Hi Farshad.
I think it is difficult to say, what is it a bug, but it needs to be solved (maybe a property as Default Value) ...
This nasty error comes out every time you use the Number Fields (when the value becomes empty), of course, when used DataSet controls: UniDBEdit, UniDBNumberEdit, UniDBGrid etc.
Thanks...
-
Fine, congratulations.
-
The code in Delphi:
procedure TMainForm.UniDBEdit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); function ToMixCase(InString: String): String; var i: Integer; begin if InString = '' then Exit; Result := LowerCase(InString); Result[1] := UpCase(Result[1]); For i := 1 to Length(InString) - 1 do begin if (Result[i] = ' ') //or (Result[i] = '''') //or (Result[i] = '"') //or (Result[i] = '-') //or (Result[i] = '.') //or (Result[i] = '(') Then Result[i + 1] := UpCase(Result[i + 1]); end; end; begin (Sender as TUniDBEdit).Text := ToMixCase((Sender as TUniDBEdit).Text) end;
but this code does not work for unicode ...
This code may not be optimal, but it is also one solution...
-
Hi Peter.
Try use CSS Text - text-transform.
http://www.codertools.com/css_help_guide/css_text-transform.aspx
http://www.w3schools.com/cssref/playit.asp?filename=playcss_text-transform&preval=capitalize
Or
Capitalize the first letter of all words in a string:
function ucFirstAllWords( str ) { var pieces = str.split(" "); for ( var i = 0; i < pieces.length; i++ ) { var j = pieces[i].charAt(0).toUpperCase(); pieces[i] = j + pieces[i].substr(1); } return pieces.join(" "); }
http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
-
-
Hi Farshad.
Please help in solving this problem!
1. Please open the project: ... \ Program Files \ FMSoft \ Framework \ uniGUI \ Demos \ GridHeaderMutipleLevelGrouping
2. Insert a button on the form UniBitBtn1, in which the handler to write the code:procedure TMainForm.UniBitBtn1Click (Sender: TObject); begin ClientDataSet2.Close end;
3. Edit any cell.
4. Click on the button.
Error!
This error comes when it is multi-level header.
Please give the solution!
Thank you ...
Simple TIP: UniEdit with an empty text (feature suggestion)
in Components and Code Samples
Posted
(not to speak of, what all JavaSript identifiers case-sensitive...)
Thank you