-
Posts
19833 -
Joined
-
Last visited
-
Days Won
645
Content Type
Profiles
Forums
Events
Posts posted by Sherzod
-
-
-
DBGrid
in Portuguese
Olá, pessoal!
Estou usando o dbgrid e quando clico na célula para editar, observei que ele não vem selecionado o conteúdo para editar, o cursor vem no final do texto, será que teria como vim com o texto selecionado?
Olá Kalvaitir.
(Traduzido por Traduz Google)
Se eu entendi a pergunta.
1. Se você não usar "columns.editor", então você pode:
UniDBGrid1 -> ClientEvents -> ExtEvents -> adicionar reconfigure:
function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[1].editor = {selectOnFocus: true}; // for all columns for (var i = 0; i < columns.length; i++) { columns[i].editor = {selectOnFocus: true}; } }
2. Se você usar "columns.editor", então você pode:
Por exemplo, as columns [1].editor = UniEdit1;
UniEdit1 -> ClientEvents -> ExtEvents -> adicionar focus:
function focus(sender, the, eOpts) { sender.selectText() }
Experimente...
Atenciosamente.
- 2
-
Hi Hamid.
You tried to search in the forum?
Sincerely. -
Hi erdal.
use typeAhead...
UniComboBox1 -> ClientEvents -> UniEvents -> [Ext.form.field.ComboBox] add.
function beforeInit(sender) { sender.typeAhead = true; }
autocomplete - if the value of a single.
try...
Best regards.
- 2
-
Hi ZigZig.
One way to solve:function beforeInit(sender) { sender.id = "MyButton1"; }
But be careful with this approach (there is a chance to give the same ID for multiple objects) !
Try...
Best regards.
- 2
-
Hi Erich.
Error shows or?
I think firstly you need to add is not in CustomCSS, add in CustomFiles.
Secondly, I added the script, but there shows an error "Could not decode media resource data: audio / wav; base64, / / uQRAAAAW ..."
Maybe better way to use, so:
var snd = new Audio("file.wav");
snd.play();
Best regards.
-
Hi Taha.
can it help?:
http://forums.unigui.com/index.php?/topic/3483-a-microsoft-excel-grid-plugin-for-ext-js-4/?hl=excel
best regards
sorry, you use VCL mode?...
-
Hi Eduardo.Hide:
procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:hidden !important");'); end;
Show:UniSession.AddJS(UniScrollBox1.JSName + '.setBodyStyle("overflowY:auto");');
Try...
Best regards. -
Hi Erich.Scrollbox position relative to what?
If relative to the screen it is possible as follows:
scrollbox.jsname + '.getX()' scrollbox.jsname + '.getY()'
Sorry scroll position:
scrollbox.jsname + '.body.dom.scrollTop' //Y scrollbox.jsname + '.body.dom.scrollLeft' //X
Best regards.
-
Hi mehmet pak.
Best regards.
-
Hi wxb_km.Basically, your question should be solved as follows:
1. Need to use the function
cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts)
2. Here cellIndex - is the column index and rowIndex - the index of the row. http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.View-event-cellclick
3. And use it to get the value:
sender.store.getAt(rowIndex).get(cellIndex)
i.e.:
function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts) { alert(sender.store.getAt(rowIndex).get(cellIndex)); }
But in my case (I use UniGUI 0.94.0.1023, under certain circumstances), I think some of the variables swapped!For me works if I do so:function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts) { alert(sender.store.getAt(tr).get(td)); }
Try...
Best regards.
- 1
-
-
How to store other languages (unicode) in cookies and get it back again
var cookieValue = document.getElementsByTagName('input')[0].value; document.cookie = "lboxcook=" + encodeURIComponent(cookieValue); function get_cookie(cookie_name) { var results = document.cookie.match ('(^| ?' + cookie_name + '=([^;]*)(;|$)'); return results ? decodeURIComponent(results[2]) : null; }
Farshad, I think in the future, by default, you can use this approach when saving cookiesSincerely.- 2
-
Hi Hank.
One of the solutions, try:
UniDBGrid1 -> ClientEvents -> ExtEvents ... add the afterrender function
function afterrender(sender, eOpts)
{
sender.getEl().select('.x-progress-text').each(function (el) {el.setStyle("font-size", "14px")})
}
Sincerely.
-
JS:window.close();
This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script.
https://developer.mozilla.org/en-US/docs/Web/API/window.close
If you are using Mozilla Firefox, enter in the about:config and modify dom.allow_scripts_to_close_windows property to true, then you can use window.close()
...
-
Hi!
If in runtime, try
1. Change TextColor:
UniSession.AddJS(UniButton1.JSName + '.badgeEl.setStyle(''color'', ''red'');');
2. Change BackgroundColor:
UniSession.AddJS(UniButton1.JSName + '.badgeEl.setStyle(''background-color'', ''red'');');
Best regards.
- 1
-
Hi Farshad.Hi perjanbr.Thank you for your answers!Sorry, but I understood the question Fenix otherwise ... ,ie how to create a custom user-defined function with callback?Is it possible?for example:after the completion of a certain function, the function calls another callback function.Sorry if I was not able to to explain the essence of my question, and if the question is not correct...Sincerely.
-
Example for?
Hi Farshad!
Creation of user-defined (arbitrary) function with callback...
Thank you.
-
additional information: port = 2077
-
Hi David.
Try to understand these examples...
http://dev.sencha.com/deploy/ext-4.0.1/examples/tree/treegrid.html
Sincerely. -
1. UniRadioButton1.Font.Color := $E7D8CC
2. I think there is a bug when using the "UniDBNavigator1.Enabled: = ..."
Use it:disabled:UniSession.AddJS(UniDBNavigator1.JSName + '.setDisabled(true)');
enabled:
UniSession.AddJS(UniDBNavigator1.JSName + '.setDisabled(false)');
Sincerely. -
Please give me an example of how Farshad, creates the function will return with callback.
+1
Hi Farshad!Can you answer us? Can you give an example?Sincerely. -
Hi Erich.I think there need to add little time delay and use javascript
Try:
aktuell_uniCanvas:=TuniCanvas.Create(self); aktuell_uniCanvas.Parent:=aktuell_panel; aktuell_uniCanvas.Left:=1; aktuell_uniCanvas.Top:=1; aktuell_uniCanvas.Width:=20; aktuell_uniCanvas.Height:=20; aktuell_uniCanvas.Pen.Color := clred; aktuell_uniCanvas.Brush.Color := clred; //code below does not have time, but can be used anywhere in the code after creating canvas //aktuell_uniCanvas.Cirlcle(1,1,10); //use UniSession.AddJS('setTimeout('''+ aktuell_uniCanvas.JSName + '.circle(1,1,10)'', 50);');
Rectangle: aktuell_uniCanvas.Rectangle(10,10,100,100); = UniSession.AddJS('setTimeout('''+ aktuell_uniCanvas.JSName + '.rect(10,10,110,110)'', 50);'); ...
Sincerely. -
And so you can change the value of combobox, try
UniDBGrid1 -> ClientEvents -> ExtEvents -> add function sortchange:
function sortchange(ct, column, direction, eOpts) { Ext.getCmp(MainForm.UniComboBox1.id).select(Ext.getCmp(MainForm.UniComboBox1.id).getStore().getAt(column.dataIndex)); }
Best regards.
Specific column
in General
Posted
Can you clarify?