Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views

In the design time, I set the CssClass property to "red"

After some event, I try to set it to "yellow", but it doesn't work.



I tried:

TxtAmount.CssClass = "yellow";

Also

TxtAmount.CssClass += TxtAmount.CssClass.Replace("red", "yellow");

plus other ways








A2H
Top achievements
Rank 1
 answered on 30 Dec 2013
2 answers
487 views
Custom paging works great, I have about 400,000 rows, so I just return 100 from sql server when I change pages, using the need_datasource event.  Now it's going to get a bit more complicated when I have 8 different items I can sort or filter.

I basically need to get the filter and convert that filter and sorting into the sql statement that I use to query the database.

I also basically have to make 2 queries to get the VirtualItemCount.

I'm basically doing a  "select ROW_NUMBER() OVER"  to make my row numbers and only getting the range of row numbers I want.  SQL Server 2012 has a fetch(I have 2008) and I saw there's a more effecient way than ROW_NUMBER() OVER, but this is easy for me to manipulate.  My main concern is CPU and memory on the webserver, so getting back just the number of rows in the page is the most important.

I'm guessing this is the best way to do it. (I'm not going to use entity framework).

I think the hard part is me translating the filters and sort orders to my sql statement.  I was wondering if there was an example like this.  No big deal if there isn't, I don't think it will be a big deal to do it, but I was wondering if maybe there was some code out there that already existed.
danparker276
Top achievements
Rank 2
 answered on 30 Dec 2013
2 answers
190 views
I need to provide accessibility cues for the textbox of the standard column filter. It looks like I could do this using a FilterTemplate which has a hidden asp:Label with its AssociatedControlId set to an asp:TextBox. However, I would then have to implement all the filtering myself rather than using what the grid provides.

Is there a way to associate a tool tip or something with the textbox provided by the standard filter? Can I somehow access the standard filter's text box?

Thanks.
Jay
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 30 Dec 2013
3 answers
149 views
I have a user control with 2 listboxes, and 2 buttons to move items from one listbox to the other. This moving is done using jQuery.

The jQuery script works fine when the listboxes aren't decorated with the RadFormDecorator. But when the listboxes are decorated, the items can't me moved between the 2 listboxes anymore.

This is a simplified version of my code, illustrating the issue:

<%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" CodeBehind="TestRadFormDecorator1.aspx.vb"
    Inherits="WebwareNET.TestRadFormDecorator1" ClientIDMode="Static" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        function wsListMoveItem(p_sSourceID, p_sTargetID) {
            $('#' + p_sSourceID + ' > option:selected').each(function () {
                $(this).remove().appendTo('#' + p_sTargetID);
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadSkinManager ID="RadSkinManager1" ShowChooser="true" runat="server" />
    <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="all" runat="server" />
    <table>
        <tr style="vertical-align: middle;">
            <td style="text-align: center;">
                Does NOT belong
                <br />
                <asp:ListBox ID="lstDoesNot" Rows="7" SelectionMode="Multiple" runat="server">
                    <asp:ListItem Text="1"></asp:ListItem>
                    <asp:ListItem Text="2"></asp:ListItem>
                    <asp:ListItem Text="3"></asp:ListItem>
                </asp:ListBox>
            </td>
            <td style="text-align: center;">
                <asp:Button ID="btnAdd" runat="server" Text="»" UseSubmitBehavior="false" OnClientClick="wsListMoveItem('lstDoesNot','lstDoes');return false;" />
                <br />
                <br />
                <asp:Button ID="btnRemove" runat="server" Text="«" UseSubmitBehavior="false"
                    OnClientClick="wsListMoveItem('lstDoes','lstDoesNot');return false;" />
            </td>
            <td style="text-align: center;">
                Does belong
                <br />
                <asp:ListBox ID="lstDoes" Rows="7" SelectionMode="Multiple" runat="server">
                    <asp:ListItem Text="a"></asp:ListItem>
                    <asp:ListItem Text="b"></asp:ListItem>
                    <asp:ListItem Text="c"></asp:ListItem>
                </asp:ListBox>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>


Why is the jQuery script not moving the items when the RadFormDecorator is activated?

Best regards, Marja
Ianko
Telerik team
 answered on 30 Dec 2013
4 answers
397 views
I'm dealing with a huge amount of data, so I'm trying to pull back only the data that needs to be shown at that moment.  I'm also trying to make that work with Paging, Filtering, and Sorting (multiple columns).  All of the Grid examples I've seen in the demo focus on one of those things only (if it's a custom implementation).

What I'm hoping to do is have all of the page, filter, and sorting information available to me on any of those events that might fire.  For example if someone adds a filter, and I'm then in the ItemCommand event, I need to see what the current page and page size are, what sorting is currently set, and what other filters are already applied.  From there I can write my own query to the database and get only the data I need.

Is this possible and if so how?  Is there a good example of this I can look at?

Thanks!

Alex
Angel Petrov
Telerik team
 answered on 30 Dec 2013
4 answers
169 views
Hi I have a form with some fields and a radgrid. When the form is opened and if the grids datasource is empty, I want the grid to go into edit mode automatically without the user having to press "Add New Record" first.

I use the grid in batch edit mode as described in this example...
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

After some quick research I've seen advice to use using the following code....
RadGrid1.MasterTableView.IsItemInserted = true
RadGrid1.Rebind()

But unfortunately this just displays the "in-place" edit form rather than simulating "Add New Record" when the grid is in batch editing mode.

Also is it possible to have a custom "Save Changes" and "Cancel Changes" button outside of the grid control elsewhere on the form? This is because I want to allow the users to edit other controls on the form but I want one "Save Changes" button to update everything. My custom Save Changes button will save outher edits on the form and also the grid edits.










Eyup
Telerik team
 answered on 30 Dec 2013
2 answers
78 views
Hi Friends,

I want to keep hover image of main menu while user mouse over on the respective child items of rad menu with default skin.

I have seen the same in given demo example with "Vista" skin. I want to use my own CSS to do the same. Please assist me to do the same.

Thanks in advance.
Kalpesh
Top achievements
Rank 1
 answered on 30 Dec 2013
2 answers
116 views

Hi,

I have a RadGrid with a selectedindexchanged event. When I click on a row, the event fires, and I can do what I want. However, after selecting a row, if I click a button on the form (nothing to do with the grid), the selectedindexchanged event fires again, and I don't get the button press.



Any ideas how to stop this please?



Thanks

Pete
Top achievements
Rank 1
 answered on 30 Dec 2013
3 answers
164 views
I have to call a popup window using radopen. i did it a lot in the same project and it works fine also i did it in the same page and it works fine too but when i using radtoolbar something happens and the radopen doesn't fire and put # at the end of URL .
here's my code :

<telerik:RadToolBar ID="GridToolBar" OnClientButtonClicking="clickHandler" dir="<%$ Resources: Main,Dir %>"
               OnButtonClick="GridToolBar_OnClick" runat="server" Width="100%">
               <Items>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToExcel  %>"
                       runat="server" Value="Excel" ImageUrl="<%$ Resources:Image, Excel%>">
                   </telerik:RadToolBarButton>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToExcelML  %>"
                       runat="server" Value="ExcelML" ImageUrl="<%$ Resources:Image, ExcelML%>">
                   </telerik:RadToolBarButton>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToWord %>"
                       runat="server" Value="Word" ImageUrl="<%$ Resources:Image, Word%>">
                   </telerik:RadToolBarButton>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToCSV  %>"
                       runat="server" Value="CSV" ImageUrl="<%$ Resources:Image, CSV%>">
                   </telerik:RadToolBarButton>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToPDF %>"
                       runat="server" Value="PDF" ImageUrl="<%$ Resources:Image, PDF%>">
                   </telerik:RadToolBarButton>
                   <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,AddExistingUser %>" CssClass="<%$ Resources: Main,ToolbarButtonAlignment %>"
                       runat="server" Value="AddUser" ImageUrl="<%$ Resources:Image, RegisterUser%>" >
                   </telerik:RadToolBarButton>
               </Items>
           </telerik:RadToolBar>

  
the last button should show a popup window using radopen. i used the javascript function calld clickhandler and here's the function :

function clickHandler(sender, eventArgs) {
            if (eventArgs.get_item().get_value() == "AddUser") {
alert("Welcome");
                radopen("Page_Popup.aspx", "RW");
                return false;
            }
        }

and RadWindow Manager is :

<telerik:RadWindowManager ID="RWM" runat="server">
                <Windows>
                    <telerik:RadWindow ID="RW" runat="server" Width="600px" Height="330px" Behaviors="Close, Move, Minimize, Pin, Reload"
                        ShowContentDuringLoad="false">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>


be informed that the alert message welcome is appeared to me.
and when i replace radopen with window.open it opens a new window.

thanks in advance
 
Mohmed
Top achievements
Rank 1
 answered on 30 Dec 2013
5 answers
279 views
Hello All,

I was wondering if anyone could point out what I'm doing wrong while trying to get the headertext to display ofr a GridClientSelectColumn. It's working fine for the other GridTemplateColumns. Here's the code I'm using and I've tried several variations and I can't get it to work.

<telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn" HeaderText="Select All">
                        <HeaderStyle Width="130" HorizontalAlign="Left" Font-Size="10px"></HeaderStyle>
                    </telerik:GridClientSelectColumn>

I've also tried using the text property of the GridClientSelectColumn. I'm using the Mar 11, 2009 Q1 version of the Telerik.web.UI.dll

Any help would be greatly appreciated and thanks in advance!
Praneet
Top achievements
Rank 1
 answered on 30 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?