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

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 />

Related

How can I get a selector to do a partial lookup on any field in the list

I have a selector that is selecting cases among several other fields, as follows:
[PXSelector(typeof(Search2<CRCase.caseCD,
InnerJoin<PMProject,
On<CRCase.customerID, Equal<PMProject.customerID>>>,
Where<PMProject.contractID, Equal<Current<EPTimecardDetail.projectID>>>,
OrderBy<Desc<CRCase.caseCD>>>),
typeof(CRCase.caseCD),
typeof(CRCase.subject),
typeof(CRCase.createdDateTime),
typeof(CRCase.caseClassID),
typeof(CRCase.status),
typeof(CRCase.contactID),
typeof(CRCase.ownerID))]
When the selector is open, the search bar will only search on the first field - the CaseCD. If I type part of the Subject field text, I want it to show, as in other lookups, the entries that have that snippet of text in them. i.e., if I know part of the Subject field, I want it to filter or show entries filtered on that bit of text I enter.
Is there a setting in the PXSelector attribute that allows this, or would it be on the aspx page for the Selector?
In the past (unless there is something new) we set the FastFilterFields in the page.
Ex from project entry on contract cd (page PM301000):
<px:PXSegmentMask ID="edContractCD" runat="server" DataField="ContractCD" DataSourceID="ds" AutoRefresh="True">
<GridProperties FastFilterFields="Description, CustomerID, CustomerID_Customer_acctName" />
</px:PXSegmentMask>
Each field listed in FastFilterFields will be searchable in the selector.
Use of FastFilterFields will apply to PXSegmentMask or PXSelector.
Another example showing selector:
<px:PXSelector ID="edReceiptNbr" runat="server" DataField="ReceiptNbr" AutoRefresh="true">
<GridProperties FastFilterFields="InvoiceNbr, VendorID, VendorID_Vendor_acctName">
</GridProperties>
</px:PXSelector>

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.

get value from specific tag as created c#

How to get the value inside de control aspx?
sample.
<asp:TextBox ID="TextBox1" tag="value_test2"
runat="server"></asp:TextBox>
I would like to get the value from tag="...".
var value = TextBox1.Attributes["tag"].Value

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 hide Gridpanel GroupCommand in 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).

Resources