| // get total record counts |
| if (e.Item is GridFooterItem) |
| { |
| GridFooterItem footer = (GridFooterItem)e.Item; |
| ViewState["RecordCount"] = footer["IdCountInFooter"].Text.Replace("Count : ", ""); |
| } |
| // change Page Size Combobox |
| if (e.Item is GridPagerItem && ViewState["RecordCount"] != null) |
| { |
| GridPagerItem pager = (GridPagerItem)e.Item; |
| RadComboBox pageSizeComboBox = (RadComboBox)pager.FindControl("PageSizeComboBox"); |
| PageSizeComboBox.Items.Add(new RadComboBoxItem(ViewState["RecordCount"].ToString(), ViewState["RecordCount"].ToString())); |
| } |
| // change Page Size Combobox |
| if (e.Item is GridPagerItem && ViewState["RecordCount"] != null) |
| { |
| GridPagerItem pager = (GridPagerItem)e.Item; |
| RadComboBox pageSizeComboBox = (RadComboBox)pager.FindControl("PageSizeComboBox"); |
| // added item doesn't fire |
| // PageSizeComboBox.Items.Add(new RadComboBoxItem(ViewState["RecordCount"].ToString(), ViewState["RecordCount"].ToString())); |
| pageSizeComboBox.Items[3].Text = ViewState["RecordCount"].ToString(); |
| pageSizeComboBox.Items[3].Value = ViewState["RecordCount"].ToString(); |
| } |
To All,
i am currently using Rad Context menu in The RAD Grid.
IN the Grid Depending upon the value i want to show some different text on the context menu.lets say in a grid we have a 3 different row.
1 for a Folder name "Master" inthat i want see "Delete" and "Rename" in the context menu
2 for a Folder name "Working" inthat i want see "Create folder in the context menu
3 for a file i want to see "Properties" and "Download"
How can i do this?i am currently using ASP.NET 2008.
Thanks
Denny
Hi ,
From all examples I have seen, it looks like you can either access a label control that resides in a User control from server side or client side code.
But I cannot seem to get this to work ?
Is it better to update the User Control clientside or server side ?
I dont know if I should be using a RadtooltipManager instead of the RadToolTip.
The Label inside of the user control is simply the title of the user control UI - "Location Maintenance". or "Type Maintenance" depending on the targetcontrolid selected.
Why cant I "view source" the ID of the RadToolTip when it is displayed ? It seems like if I could do this, I could get a handle on something to getElementby client side ? Maybe the sequence of my client side code is wrong.
Here are snips from my current code ...... (Please see " <%-- START QUICK ADD TOOLTIP --%> ") The user control has an ID of location_qadd
<EditFormSettings EditFormType="Template">
<FormStyle BackColor="#996633" ForeColor="Yellow" />
<FormTemplate>
<%
-- <table id="Table2" cellspacing="0" cellpadding="0" width="100%" border="0"
style="border-collapse: collapse; background: white; font-size: small"> --
%>
<div style="left: 5px">
<!-- Outer div -->
<div style="text-align: center; font-size: medium; width: 100%">
<asp:Label ID="lblTitle" runat="server" Width="358px" Font-Bold="true" />
<asp:Label ID="seFormHelp" Width="10" Font-Size="medium" ForeColor="Yellow" Font-Bold="true"
runat="server">
<img style="border:0px; " alt="Help" src="../iqimages/trImages/Help.gif" />
</asp:Label>
<telerik:RadToolTip ID="RadToolTipFormHelp" runat="server" ManualClose="true" TargetControlID="seFormHelp"
Position="MiddleRight" RelativeTo="Element" Skin="Outlook" Animation="None" Sticky="true"
Width="250" Height="600"
AutoCloseDelay="3000">
<div>
<p style="text-align: center">
<b>Maintain Equipment Information </b>
</p>
<p style="text-align: left">
<b>Name </b>- Give this Equipment a Name. An Example could be "Row Machine".<br>
You may use different Row Machines. So, the first one could be Row Machine 1.
</p>
<p style="text-align: left">
<b>Location </b>- From your Exercise Location list, choose the location where
this equipment is.
<br> If you have not entered any of your Exercise Locations
, you can go to the Exercise Location page and enter your Exercise Locations.
</p>
<p style="text-align: left">
<b>Type </b>- From your Type list, choose the Type of Exercise Equipemnt this is.<br>
If you have not entered any of your Types, you can go to the Type Maintenance
page and enter your Types.
<br> Some Examples of Types could be "Cardio Equipment"
, "Hiking Equipment" or "Exercise Clothing".
</p>
<p style="text-align: left">
<b>Make and Model </b>- You can enter the Make and Manufacturer Model if you
like.
</p>
<p style="text-align: left">
<b>Gym ID </b>- In some gyms and fitness centers, they put information to identify
that piece of equipment. Most of the time it will be a number.
<br> You can put that
information here.
<br> It helps when a facility has more than one of the same piece of
Equipment.
<br>
Even though Equipment may be the same, sometimes they may be calibrated differently,
or, one may work better than another for you.
<br>
It also helps if you need to remember which Equipment you use in a facility.
</p>
<p style="text-align: left">
<b>Notes</b>- Note any information that is important to you about this Equipment<br>
</p>
<p style="text-align: left">
<b>Save </b>- Click this to Save your Information.<br>
</p>
<p style="text-align: left">
<b>Cancel</b>- Cancel your current request to Add or Update Equipment information.<br>
</p>
<p style="text-align: left">
<img style="border: 0px" alt="" src="../iqimages/trImages/Help.gif" />
- This is the
<b>HELP link</b>. Position your mouse here see the help topic.<br>
To close the help, move the mouse away and click.
</p>
</div>
</telerik:RadToolTip>
</div>
<div>
<asp:TextBox ID="TextBox1" Width="0px" runat="server" Text='<%# Bind( "equEquipmentNo") %>'
Visible="false" />
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:Label ID="Label1" runat="server" Text="Name .....:" ToolTip="Equipment Name "
Width="85px" Font-Bold="true" />
<asp:TextBox ID="sEquipmentName" Width="250px" MaxLength="50" runat="server" Text='<%# Bind( "equEquipmentName") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="sEquipmentName"
Text="!" ErrorMessage="You Need Equipment Name" runat="server">
</asp:RequiredFieldValidator>
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:TextBox ID="sequEquipmentLocNo" Width="0px" runat="server" Text='<%# Bind( "equEquipmentLocNo") %>'
Visible="false" Font-Bold="true" />
<asp:Label ID="Labeltyp1" runat="server" Text="Location .:" ToolTip="Select Equipment Location "
Width="85px" Font-Bold="true" />
<asp:DropDownList ID="equEquipmentddl" Width="150px" runat="server" AppendDataBoundItems="True">
<asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
</asp:DropDownList>
<%
--ImageButton in a form only postback on OnClick= --%>
<asp:ImageButton runat="server" ID="quickAddLocation" OnClick="qAddLocation_Click"
Text="Add Location" ForeColor="Yellow" BackColor="#996633" ImageUrl="~/mybodyscience/iqimages/trImages/AddRecord.gif"
CausesValidation="false" />
</div>
<%
-- START QUICK ADD TOOLTIP --%>
<div>
<telerik:RadToolTip ID="RadQuickLocation" runat="server"
ManualClose="true" TargetControlID="quickAddLocation"
Position="MiddleRight" RelativeTo="Element" Skin="Outlook"
Animation="None" Sticky="true" HideEvent="LeaveTargetAndToolTip"
ShowEvent="FromCode" OnPreRender="quickLocationPrerender" OnClientBeforeShow="iqAddLocation_beforeShow"
Width="250" Height="150">
<IQqaddPrefix:IQqaddTag ID="location_qadd" runat="server" />
</telerik:RadToolTip>
<div>
</div>
<%
-- END QUICK ADD TOOLTIP --%>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:TextBox ID="sequEquipmentTypeNo" Width="0px" runat="server" Text='<%# Bind( "equEquipmentTypeNo") %>'
Visible="false" />
<asp:Label ID="Label2" runat="server" Text="Type ......:" ToolTip="Select Equipment Type "
Width="85px" Font-Bold="true" />
<asp:DropDownList ID="equEquipmentTypeddl" Width="150px" runat="server" AppendDataBoundItems="True">
<asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
</asp:DropDownList>
<%
--ImageButton in a form only postback on OnClick= --%>
<asp:ImageButton runat="server" ID="quickAddEquipmentType" ImageUrl="~/mybodyscience/iqimages/led-icons/add.png"
OnClick="quickTypeAdd" CommandName="quickEquipTypeAdd" CausesValidation="False" ToolTip="Add/Change Equipment Type" />
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:Label ID="Label3" runat="server" Text="Make ......:" ToolTip="Equipment Make "
Width="85px" Font-Bold="true" />
<asp:TextBox ID="sequEquipmentMake" Width="250px" MaxLength="30" runat="server" Text='<%# Bind( "equEquipmentMake") %>' />
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:Label ID="Label4" runat="server" Text="Model .....:" ToolTip="Equipment Model "
Width="85px" Font-Bold="true" />
<asp:TextBox ID="sequEquipmentModel" Width="250px" MaxLength="30" runat="server"
Text='<%# Bind( "equEquipmentModel") %>' />
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:Label ID="Labgid" runat="server" Text="GymID ...:" ToolTip="Sometimes in a Gym, they label the equipment with a number or other ID"
Width="85px" Font-Bold="true" />
<asp:TextBox ID="sequEquipmentGymID" Width="250px" MaxLength="15" runat="server"
Text='<%# Bind( "equEquipmentGymID") %>' />
</div>
<br>
<div style="margin-left: 5px; font-size: medium">
<asp:Label ID="Label5" runat="server" Text="Notes .....:" ToolTip="Any notes or comments about this Piece of Equipment"
Width="85px" Font-Bold="true" />
<asp:TextBox TextMode="MultiLine" ID="sequEquipmentNotes" Width="250px" MaxLength="100"
runat="server" Text='<%# Bind( "equEquipmentNotes") %>' />
</div>
<br>
<div style="text-align: center">
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Save" %>'
runat="server" OnClientClick="ShowTooltip()" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel" OnClientClick="HideTooltip()"></asp:Button>
</div>
</div>
<!-- Outer div -->
<%
-- </table> --%>
</FormTemplate>
</EditFormSettings>
thanks for your help
Question 1 - Does the user have any control on the text that is displayed in the Radcombobox while using keyboard navigation.
ChangeTextOnKeyBoardNavigation = "true" or "false" just completely turns it on or off.
Question 2 - Is there any property that will return the index or text of the currently focussed item? eg. if i am currently highlighting the 6th item in the combobox items with my keyboard. (Selected item does not return the item that i just highlight during keyboard navigation)
If you need more information about what we are trying the achieve you can continue to read...
We are using the Radcombobox to autosuggest employees. For better user experience, what we want to do is - If the user tyes something like - 'smith', in all the auto suggested values we want to 'bold' the text 'smith' eg-
John Smith
Jonathon Smithson
Smith and others
so what we do is while populating the list of values to autosuggest, we use the <b> tags to format the text.
So baiscally we add
John <b>Smith</b>
<b>Smith</b> and others
etc...
This works perfectly and we can see the search results with Smith highlighted.
However, when we use the keyboard to navigate in this list of suggested values, the text 'John <b>Smith</b>' (with the html <b> tags) appear in the text box.
Please advise.
| function ShowAddUserPopup() { |
| var oWnd = $find("<%=AddUserPopup.ClientID%>"); |
| oWnd.setUrl('addUser.aspx'); |
| oWnd.show(); |
| } <
telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow ID="AddUserPopup" runat="server" Behavior="Close" Modal="True" Width="700px" Height="650px" VisibleStatusbar="False" OnClientClose="OnClientClose">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<
button onclick="ShowAddUserPopup();return false;" type="button">Add User</button>
|
| AddUserPopup.OpenerElementID = btnAddUser.ClientID; |
| AddUserPopup.NavigateUrl = "addUser.aspx"; |
| lblMessage.Text = "<script>ShowAddUserPopup()</script>"; |
| function ShowEditUserPopup() { |
| var oWnd = radopen('editUser.aspx', "EditUserPopup"); |
| } |