Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
388 views
Hi,

I would like to modify PageSizeComboBox to include total number of records in the grid, i.e. allow users to show all records on one page.  To achieve that, I first get the row counts by doing:

            // get total record counts  
            if (e.Item is GridFooterItem)  
            {  
                GridFooterItem footer = (GridFooterItem)e.Item;  
                ViewState["RecordCount"] = footer["IdCountInFooter"].Text.Replace("Count : ", "");  
            } 

and then I modified PageSizeComboBox by doing:

            // 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()));  
            } 

This does add the record count to PageSizeComboBox, however, when I select this added item in PageSizeComboBox, it doesn't update the grid.  So then I tried to change the last item in PageSizeComboBox:

            // 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();  
            } 

This works.  However, if I did drag-n-drop grouping after setting the page size to RecordCount, the page size was automatically set to the first item in the combobox, rather than the last item.  Could you please advise the best way to update PageSizeComboBox items? 

Thanks,

Pavlina
Telerik team
 answered on 26 Jun 2009
1 answer
93 views
Hi Telerik Guys !

I need your help & Iam quite sure that you guys will help me.

Guys ! I have the following issue :-

Iam using RAD EDITOR on to one of  my TAB CONTAINER TABS , now when ever I drag my mouse on to the lower  bottom section of the RAD EDITOR it gets expended & whole alignment of the PAGE gets disturbed.

How can I fixed the width & height of the RAD EDITOR so that my page alignment dont get disturbed.

Please help guys !!!!!!!!!!! 
Yavor
Telerik team
 answered on 26 Jun 2009
1 answer
181 views

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

Shinu
Top achievements
Rank 2
 answered on 26 Jun 2009
4 answers
157 views
I am using both radmenu OnClientItemClicked OnClientMouseOver. I use OnClientMouseOver to display a radtooltip. But after the first time the tooltip is shown, I get an "Unspecified Error" javascript message. When I mouse over, its fine. I get this error as soon as I do the first mouse click on this same radmenuitem, but I only code for this menu item (Which by the way is a menu item called "Help") inside of the OnClientMouseOver. By the way, I also have the serverside OnItemClick coded in the RadMenu as well for other menuitems in the same RadMenu.
I am also wondering how to call the radtooltip from the serverside, and which is more practical - clientside radtootip.show or a serverside call ?
thanks for your time.  
IQworks
Top achievements
Rank 1
 answered on 26 Jun 2009
2 answers
173 views

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>&nbsp;

 

 

<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

 

IQworks
Top achievements
Rank 1
 answered on 26 Jun 2009
7 answers
285 views
Hi,

I would like to add a copy button to a record like the edit and delete buttons that would open the add new record form and prepopulate the form items with the data from the record being copied.  This way some of the data can be changed before it is saved to the database and avoid the user having to copy the record and then edit it to make changes.

Any help would be appreciated. Thanks.
Katie
Top achievements
Rank 1
 answered on 25 Jun 2009
0 answers
236 views

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.

Jyoti
Top achievements
Rank 1
 asked on 25 Jun 2009
11 answers
391 views
Hi guys, need a bit of help, here's the scenario

I'm popping up a RadWindow on the click of a button, which I have working fine in 2 different ways:-
Method 1, aspx page
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>

 

 

 

 


Method 2, CS page
AddUserPopup.OpenerElementID = btnAddUser.ClientID;  
AddUserPopup.NavigateUrl = "addUser.aspx"; 

Both work fine but what I need to do is, when a user clicks the button, check the users' permission stored in the database first and if they have the relevant permission for accessing the section then it will pop up the radWindow

So it would need to be in an if else statement.

I tried the following in the if else
lblMessage.Text = "<script>ShowAddUserPopup()</script>"; 
but it throws a runtime error stating that the oWnd window handle is null. I then tried the following in place of the code in the first section
function ShowEditUserPopup() {  
    var oWnd = radopen('editUser.aspx', "EditUserPopup");  
} 
but it threw an error stating that RadWindowManager was null. RadWindowmanager is present as is shown in the first section of code.

Any help would be appreciated.
Denis
Top achievements
Rank 1
 answered on 25 Jun 2009
2 answers
342 views
I have a RadGrid where the first column is declaratively created as GridBoundColumn:
                <%--ID COLUMN--%>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" ReadOnly="True"
                    SortExpression="ID" UniqueName="ID">
                    <ItemStyle Width="35px"></ItemStyle>
                </telerik:GridBoundColumn>

It is defined as the only DataKeyName in the grid:
        <MasterTableView DataKeyNames="ID" DataSourceID="WORDC" PageSize="40" AllowMultiColumnSorting="true"
            EnableHeaderContextMenu="true" >

Defined in ClientSettings I have:
            <ClientEvents OnRowSelected="RowSelected" />

The function RowSelected is defined (to test, there is a bigger "Real" function if I ever get this to work) as:
        function RowSelected(sender, args) {
            var ID = args.getDataKeyValue("ID")
            var label = 
            "ID:" + args.getDataKeyValue("ID");
        } 

With the grid populated, EVERY ID column has a value. But when I select a row and break in the function all I ever get is null for args.getDataKeyValue("ID").

WHAT am I missing??????

Thanks,

Joe B
Brad
Top achievements
Rank 2
 answered on 25 Jun 2009
1 answer
64 views
Is there such a thing as a server side rowselect?

I've got 2 radgrids.  When I select a ROW (not a button) on the lefthand grid I want to change what is displayed in the righthand grid.

How?
Daniel
Telerik team
 answered on 25 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?