How to hide Gridpanel GroupCommand in Ext.Net - ext.net

I am working with Ext.Net1.0. and I am working with Grid Panel with grouping
In that I had set Group Command I want to hide Group Command..
<ext:ImageCommandColumn Width="110">
                    <GroupCommands>
                        <ext:GroupImageCommand CommandName="Delete" Icon="Delete" Text="Delete" RightAlign="true">
                            <ToolTip Text="Delete" />
                        </ext:GroupImageCommand>
                        <ext:GroupImageCommand CommandName="Edit" Icon="TableEdit" Text="Edit" RightAlign="true">
                            <ToolTip Text="Edit" />
                        </ext:GroupImageCommand>
                    </GroupCommands>
                </ext:ImageCommandColumn>
How can I get GroupCommand??

You can look in this thread http://forums.ext.net/showthread.php?11425-CLOSED-Reach-Command-coloumn-at-run-time-with-javascript&p=46416&viewfull=1#post46416

Done with in ext:ImageCommandColumn and In prepareGroupCommand Function we can get Command Name through(command.command).

Related

Nativescript ActionBar / ActionItem alignment

I have an issue someone here might help to solve... I have currently an ActionBar which looks like this:
If you touch the magnifier, this is what is shown:
And if you touch the back arrow, the action bar should be like it was at first, but something weird happens to the magnifier...
I'm currently showing / hiding the ActionItems with the visibility attribute, but I don't know why this misalignment is happening when I show them again.
The actual code is something like this:
<ActionBar
class="action-bar"
title="{{ actionBarTitle }}"
[ngClass]="{
'action-bar-search-bar-visible' : showSearch
}"
>
<!-- Android menu button -->
<NavigationButton
(tap)="toggleDrawer()"
[visibility]="showSearch ? 'collapse' : 'visible'"
*ngIf="isAndroid"
class="action-bar-item"
icon="res://menu_icon_white"
></NavigationButton>
<!-- iOS menu button -->
<ActionItem
(tap)="toggleDrawer()"
[visibility]="showSearch ? 'collapse' : 'visible'"
*ngIf="isiOS &&"
class="action-bar-item action-bar-item-menu-icon"
ios.position="left"
><Image src="res://menu_icon_white"></Image></ActionItem>
<!-- Search bar toggle -->
<ActionItem
(tap)="toggleSearch()"
[visibility]="showSearch ? 'collapse' : 'visible'"
android.position="popup"
class="action-bar-item action-bar-item-menu-icon"
ios.position="right"
><Image src="res://ic_search"></Image></ActionItem>
<!-- Search bar -->
<search-bar-custom
*ngIf="showSearch"
(on-search-hide)="toggleSearch()"
></search-bar-custom>
</ActionBar>
You are using visibility to show/hide the action items,
Use the same technique to show or hide the search bar, instead of *ngIf.
Also try setting android.position="right" for the search bar icon.

How to use sort="auto" on A object?

I have a listheader element with sort="auto" set, but when I click the column, the list doesn't sort. The arrows appear and reverse direction, but the list order doesn't change.
The Components appended to the list are org.zkoss.zul.A objects, which appears to be the reason sorting does not work.
Is there a workaround to get sorting to work for a Listbox whose list items are A objects?
my zul:
<listbox id="myList" checkmark="true" multiple="true">
<listhead>
<listheader id='select' label="" width="30px" align="left"/>
<listheader label="myLabel" width="75px" sort="auto"/>
</listhead>
</listbox>
groovy:
Listitem li = new Listitem(value: "myId")
li.appendChild(new Listcell())
Listcell listcell = new Listcell()
Long theId = "12345"
A link = new A(label: theId.toString(), style: "color:blue;")
listcell.appendChild(invoiceLink)
li.appendChild(listcell)
I'am using MVVM approach and this is how I sort my listbox
<listbox>
<listhead>
<listheader label="Hopper" width="60px" sort="auto(hopperCode)" />
<listheader label="Stop Time" width="80px" sort="auto(startTime)" />
</listhead>
<template name="model">
<listitem>
<listcell label="#load(each.hopperCode)" />
<listcell label="#load(each.startTime)" />
</listitem>
</template>
</listbox>
According to this paragraph in the documentation, sort auto sorts by the label of the listcell. You are not using Listcell.setLabel(), but append an A component to it. Since the listcells' labels are all the same (i.e. ""), sorting doesn't do anything.
Try setting custom comparators. For this purpose I advise using a model instead of creating the listitems yourself.

Ext:BooleanColumn,when editing ,it shows true or false value

I have a grid and there is ext:BooleanColumn inside it,and I put a combobox for editing boolen colum.everything works fine ,except of this one .when I click boolen colum to edit,it shows false or true inside it,
I added a image what I trying to say.
how I can avoid this .thank you
and here is the my code :
<ext:BooleanColumn ID="BooleanColumn1" runat="server" DataIndex="BorcOdendimi" TrueText="odendi" Text="ödenme durumu"
FalseText="odenmedi" >
<Editor>
<ext:ComboBox runat="server" Text="odendi durumu" Editable="false">
<Items>
<ext:ListItem Text="Odendi" Value="1" />
<ext:ListItem Text="Odenmedi" Value="0" />
</Items>
</ext:ComboBox>
</Editor>
</ext:BooleanColumn>
To get it working the Values of the ComboBox's Items should match the values of a BooleanColumn. Currently, true/false (BooleanColumn's values) doesn't match 1/0 (ComboBox Items' values).
You can replace the existing ComboBox's Items with:
<ext:ListItem Text="Odendi" Value="true" Mode="Raw" />
<ext:ListItem Text="Odenmedi" Value="false" Mode="Raw" />
Answered in the Ext.NET forums thread.

Get selected values from MultiCombo in Ext.NEt via JS

I am using Ext.Net I have a form with a ComboBox which I have just changed to a MultiCombo.
Previously I used "SelectEnquiry.getValues()" to retrieve the selected item and pass it into a parameter used with a Button Direct Event.
How do I get the selected values when using the MultiCombo?
Combo Box Bit
<ext:MultiCombo runat="server" ID="SelectEnquiry" FieldLabel="Enquiry" AnchorHorizontal="95%" Editable="false" ValueField="Id" DisplayField="ProviderName" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Select Enquiry" ValueNotFoundText="Select Enquiry" ItemSelector="div.list-item" SelectOnFocus="true" AllowBlank="false">
Button form submit bit
<ext:Button runat="server" ID="ButtonEmailTaskAccept" Text="OK">
<Listeners>
<Click Handler="if (PanelUnlinked.isVisible() && !$form.validate( [SelectProject, SelectEnquiry])) return false;">
</Click>
</Listeners>
<DirectEvents>
<Click Url='<%# Url.Action("CompleteEmailTask") %>' AutoDataBind="true"
Success="window.$messageBus.publish('task-admin', 'inbox-changed');
window.$messageBus.publish('task-admin', 'task-changed');
WindowAssignEmail.close()" Failure="$shell.requestFailedHandler(response, null)"
Json="true">
<EventMask ShowMask="true"></EventMask>
<ExtraParams>
<ext:Parameter Name="emailResponseId" Value="<%# Model.EmailResponse.Id %>" Mode="Value"
AutoDataBind="true" />
<ext:Parameter Name="enquiryId" Value="SelectEnquiry.getValues()" Mode="Raw" />
<ext:Parameter Name="documentList" Value="buildSelectionList()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
With <ext:MultiCombo> you can just call .getValue() to return an Array of selected values. I'll look into adding .getValues() as well, so it's consistent with the <ext:ComboBox> api.
Edit
It appears the ComboBox does not have a client-side .getValues() function, so we won't be adding to the MultiCombo. Just use .getValue(), which is standardised across all Form Fields.
The problem seemed to be that it could not locate the control I was try to get the value from.
So managed to solve it by doing:
#{SelectEnquiry}.getSelectedValues()

How to Disable ToolTip without Removing the "title" attribute [ASP.NET]

I have 3 TextBoxes
<asp:TextBox ID="txtTitle" runat="server" class="txtFields" title="Title" />
<asp:TextBox ID="txtName" runat="server" class="txtFields" title="Name" />
<asp:TextBox ID="txtDescription" runat="server" class="txtFields" title="Description" />
I'm using the watermark plugin on these 3 TextBoxes:
jQuery('.txtFields').watermark();
This is the plugin:
http://code.google.com/p/jquery-watermark/
jQuery('.txtFields').watermark();
Uses the Title Attribute of the TextBox to Show the Watermark but the problem is that this also Generates ToolTips which is something I do Not want, is there anyway to disable the tooltips without removing the title attribute?
Or is there anyway to use custom attributes with this plugin? By that I mean making the plugin use another attribute instead of the title attribute.
Thank you.
Looks like watermark will allow you to specify any text to display in there, so you're not stuck with the title. Any attribute that you could select with jQuery you could use as the watermark value. The problem with that is there are no other attributes you could add in there and still have nice compliant code. Best bet is to give them a value, assign a variable that value, unset it and add watermark. Something like:
$('input').each(function() {
var wmark = $(this).val();
$(this).val('');
$(this).watermark(wmark);
});
Try adding UseAccessibleHeader = false
like this:
<asp:TextBox ID="txtTitle" runat="server" class="txtFields" title="Title" UseAccessibleHeader = false />

Resources