Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
266 views
Within a RadGrid that uses the NeedDataSource method and using paging, there is a select all column. When the Header checkbox is selected, the items on the first page are selected only. How can I select all of the records within the RadGrid.

This is the code I have in place for selecting all dataitems:
CheckBox headerCheckBox = (sender as CheckBox);
foreach (GridDataItem dataItem in this.radgridmailinglists.MasterTableView.Items)
{
    (dataItem.FindControl("chxselectrow") as CheckBox).Checked = headerCheckBox.Checked;
    dataItem.Selected = headerCheckBox.Checked;
}

Jayesh Goyani
Top achievements
Rank 2
 answered on 10 Mar 2012
3 answers
94 views
hi, I'm using RadMenu in my webapplication which shows menus and sub menus
There are Two Main Root that each has some sub menues
1. Articles
2. Videos
each item has sub menu
like this
Article > Programming
Article > Web
Article > Programming > C
Article > Programming > C#
Article > Web > ASP.NET
Article > Web > PHP

Video> Programming
Video> We
Video> Programming > C
Video> Programming > C#
Video> Web > ASP.NET
Video> Web > PHP

and so on
how can i find which of the selected items belongs to Article and Which of them belong to Video?
Behnam
Top achievements
Rank 1
 answered on 10 Mar 2012
2 answers
96 views
Hi,

I am doing grid edit and update during double click. I have got the row in edit mode while double clicking but the row is not changed to normal form after updating. The row is still in edit mode.

Thanks in advance
Ajmal
Top achievements
Rank 1
 answered on 10 Mar 2012
2 answers
73 views
Hello, I am having an issue with the RadScriptManager in Firefox. I'm trying to do a __doPostBack. And it is not working in Firefox. It works in every other browser but not FF. I noticed that the code generated from the script manager is not including the language=JavaScript param. Is this the issue. And if so how do I get the RadScriptManager to write that param.
Jon
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
51 views
I have a graph that I'm dynamically creating. You can see it here http://www.cnppid.com/Assets/McConaughy_One-Year.jpg . How I'm building it is each day has a point. So this graph has an x range from 0 to 365. The problem is, I don't know how to add the labels so it only shows the month. Right now I have a data table with the y value, the x value, and what month it falls under. How do I make it so it shows the month label, but only once per month? Here's how I'm adding points to my graph.

For Each i As DataRow In rangeTable.Rows
            myPoint.XValue = i("Count")
            myPoint.YValue = i("Value")
            myPoint.Label.Visible = False
            mySeries.AddItem(myPoint)
Next

Web Services
Top achievements
Rank 2
 answered on 09 Mar 2012
3 answers
104 views
I have a page that I am adding a wrapper div to after the page has been completely loaded.  However, when this div is added, RadComboBoxes stop expanding or receiving input of any kind.  Upon further testing, I found that the same happens for any control that has a popup div, such as datepickers.  This is the code I'm using to add the div:

var body = GetFrameBody();
body.innerHTML = "<div id='reportwrapper' style='overflow:auto; position: relative;'>" + body.innerHTML + "</div>";

Thanks in advance for any help/insight you can offer.
Cat Cheshire
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
67 views
Hi,

I have two controls in a page. Rad chart and Rad grid.
 I want to export both chart and grid control in same PDF or  new window.
 
Regards
Shoba.
Richard
Top achievements
Rank 1
 answered on 09 Mar 2012
5 answers
282 views

Hi

I am following the following example to display an aspx page in popup radwindow.

http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

My code to display radwindow is given below at the end and is the equivalent of Dialog1.aspx in the above example. The code works fine and the content of the below aspx page opens fine in radwindow. Problem is when I click on the ‘I Accept’ button to close the radwindow and return the values to calling page (not included here) the radwindow closes but then reappears immediately. In other words the radwindow cannot be closed permanently using the ‘I Accept’ button. What is the problem and how can I make it work like the example in above link where pressing Submit button in dialog1.aspx closes the radwindow and returns values to calling form?

Many Thanks

Regards

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewDocument.aspx.cs" Inherits="SitefinityWebApp.Widgets.TestWidgets.ViewDocument" %>
  
<!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>
</head>
<body style="margin: 0px" onload="AdjustRadWidow();">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" runat="server"
        Skin="Sunset" />
    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
  
        function openWin2() {
            var parentPage = GetRadWindow().BrowserWindow;
            var parentRadWindowManager = parentPage.GetRadWindowManager();
            var oWnd2 = parentRadWindowManager.open("Dialog2.aspx", "RadWindow2");
            window.setTimeout(function () {
                oWnd2.setActive(true);
            }, 0);
        }
  
        function populateCityName(arg) {
            var cityName = document.getElementById("cityName");
            cityName.value = arg;
        }
  
        function AdjustRadWidow() {
            var oWindow = GetRadWindow();
            setTimeout(function () { oWindow.autoSize(true); if ($telerik.isChrome || $telerik.isSafari) ChromeSafariFix(oWindow); }, 500);
        }
  
        //fix for Chrome/Safari due to absolute positioned popup not counted as part of the content page layout
        function ChromeSafariFix(oWindow) {
            var iframe = oWindow.get_contentFrame();
            var body = iframe.contentWindow.document.body;
  
            setTimeout(function () {
                var height = body.scrollHeight;
                var width = body.scrollWidth;
  
                var iframeBounds = $telerik.getBounds(iframe);
                var heightDelta = height - iframeBounds.height;
                var widthDelta = width - iframeBounds.width;
  
                if (heightDelta > 0) oWindow.set_height(oWindow.get_height() + heightDelta);
                if (widthDelta > 0) oWindow.set_width(oWindow.get_width() + widthDelta);
                oWindow.center();
  
            }, 310);
        }
  
        function returnToParent() {
            //create the argument that will be returned to the parent page
            var oArg = new Object();
  
  
            oArg.cityName = "London";
  
            oArg.selDate = toLocaleString();
  
            //get a reference to the current RadWindow
            var oWnd = GetRadWindow();
  
            //Close the RadWindow and send the argument to the parent page
            if (oArg.selDate && oArg.cityName) {
                oWnd.close(oArg);
            }
            else {
                alert("Please fill both fields");
            }
        }
    </script>
    <div>
        <asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%">
            <table style="width: 100%; height: 100%;">
                <tr>
                    <td colspan="3">
                           
                        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                             
                    </td>
                </tr>
                <tr>
                    <td align="center" width="40%">
                           
                    </td>
                    <td align="center" width="10%" style="width: 20%">
                        <button title="I Accept" id="close" onclick="returnToParent(); return true;">
                            I Accept</button>
                    </td>
                </tr>
  
            </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>

Satya
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
142 views
Hi,
I use the Q3 2011 version of radcombobox (with the checkboxes) :

                        <FormTemplate>
                            <br />
                            <table>
                                <tr style="width: 100px">
                                    <td class="style44" style="font-family: Verdana; font-size: x-small;">
                                        Κωδ.Προϊοντος:
                                    </td>

                                    <td class="style29">

                                        <telerik:RadComboBox
                                            ID="RadComboBox1" runat="server" Filter="Contains" ItemsPerRequest="20" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
                                            Width="350px" Height="200px"  Font-Size="X-Small" Font-Names="verdana" EnableLoadOnDemand ="true"
                                            ShowMoreResultsBox="True"
                                           
OnItemsRequested="RadComboBox1_ItemsRequested"
                                            style="margin: 20px auto; display:block !important;" />


                                            <asp:Button ID="Button1" runat="server" Text="Get Checked Items!" CssClass="qsfButtonBigger"             commandname="Button1Action" />
                                                <br />
                                            <asp:Label ID="itemsClientSide" runat="server" BorderStyle="None" CssClass="text" />
                                    </td>
                                </tr>
                            <table />
                        </FormTemplate>  

-----------------------------------------------------------------------------------------------------------------


I fill in the radCombobox with the :

    Protected Sub RadCombobox1_ItemsRequested(ByVal o As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)

        Dim data As DataTable = GetData(e.Text)
        Dim comboBox As RadComboBox = DirectCast(o, RadComboBox)
        Dim row As DataRow
        comboBox.Items.Clear()

        Dim text As String = e.Text

        If text <> "" Then
            If Len(text) >= 3 Then

                Dim rows As DataRow() = data.[Select]("newprd LIKE '" + "%" + text + "%'")

                Dim itemsPerRequest As Integer = 20
                Dim itemOffset As Integer = e.NumberOfItems
                Dim endOffset As Integer = itemOffset + itemsPerRequest
                If endOffset > rows.Length Then
                    endOffset = rows.Length
                End If

                Dim i As Integer = itemOffset
                While i < endOffset
                    comboBox.Items.Add(New RadComboBoxItem(rows(i)("newprd").ToString()))
                    System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
                    i = i + 1
                End While

                For Each row In data.Rows
                    comboBox.Items.Add(New RadComboBoxItem(row("newprd").ToString()))
                Next row

                e.Message = [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, rows.Length)

            End If
        End If
    End Sub

-----------------------------------------------------------------------------------------------------------------

And the data are from :

    Private Function GetData(ByVal text As String) As DataTable
        If text <> "" Then
            If Len(text) >= 3 Then
                Dim seq As String = " SELECT prdcode as prdcode,prdtext,prdcode + '  ' + prdtext as newprd,P,D,S " + _
                                    " FROM Products_Kompass " + _
                                    " where " + _
                                    " prdcode + '  ' + prdtext like '" + "%" + Trim(text) + "%" + "'" + _
                                    " order by prdcode "

                Dim adapter As New SqlDataAdapter(seq, ConfigurationManager.ConnectionStrings("P2OPubConnectionString").ConnectionString)

                Dim data As New DataTable()
                adapter.Fill(data)
                Return data
            End If
        End If
    End Function

-----------------------------------------------------------------------------------------------------------------

When I select the items from the radcombobox and push the button (button1) :

    Protected Sub radKOMPASS_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles radKOMPASS.ItemCommand

        Select Case e.CommandName

            Case "Button1Action"

                Dim cb As RadComboBox = e.Item.FindControl("RadCombobox1")
                Dim sb As New StringBuilder()
                Dim collection As IList(Of RadComboBoxItem) = cb.CheckedItems /// Here the count is zero (0) ///

                For Each item As RadComboBoxItem In Collection
                    sb.Append(item.Text + "<br />")
                Next

                Dim lb As Label = e.Item.FindControl("itemsClientSide")

                lb.Text = sb.ToString()
        End Select
    End Sub


In a few words I can't take the items which i chosen from the radcombobox. There is not any error in the code. The result is ZERO in the cb.CheckedItems.

Please,I need your help desperately. My implementation time is over.
Thanks in advance.

Kalina
Telerik team
 answered on 09 Mar 2012
1 answer
116 views
I am looking into deploying the SPRadScheduler web part, but would like to know if it is possible to display the control as a mini calendar view.  Hovering or clicking on the dates would display the schedule for that particular day. I haven't found any documentation on how to do this.  Is this possible?
Kalina
Telerik team
 answered on 09 Mar 2012
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?