Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
225 views
Hi All

Have a RadDatePicker, which works fine.

Need only month and Year to view.

So have called up a JaVAscript function which shows date and month

It works fine in IE. In firefox nothing happens when RadDatePicker is clicked.

function setCalendarTable() {
  
            var picker = $find("<%= radDate.ClientID %>");
            var calendar = picker.get_calendar();
            var fastNavigation = calendar._getFastNavigation();
            $clearHandlers(picker.get_popupButton());
            picker.get_popupButton().href = "javascript:void(0);";
  
            $addHandler(picker.get_popupButton(), "click", function() {
  
                var textbox = picker.get_textBox();
                //adjust where to show the popup table 
                var x, y;
                var adjustElement = textbox;
                if (textbox.style.display == "none")
                    adjustElement = picker.get_popupImage();
  
                var pos = picker.getElementPosition(adjustElement);
                x = pos.x;
                y = pos.y + adjustElement.offsetHeight;
  
                var e = {
                    clientX: x,
                    clientY: y - document.documentElement.scrollTop
                };
                //synchronize the input date if set with the picker one
                var date = picker.get_selectedDate();
                if (date) {
                    calendar.get_focusedDate()[0] = date.getFullYear();
                    calendar.get_focusedDate()[1] = date.getMonth() + 1;
                }
  
                $get(calendar._titleID).onclick(e);
  
                return false;
            });
  
            fastNavigation.OnOK =
                    function() {
                        var date = new Date(fastNavigation.Year, fastNavigation.Month, 1);
                        picker.get_dateInput().set_selectedDate(date);
                        fastNavigation.Popup.Hide();
                    }
  
  
            fastNavigation.OnToday =
                    function() {
                        var date = new Date();
                        picker.get_dateInput().set_selectedDate(date);
                        fastNavigation.Popup.Hide();
                    }
        }

This is the function called in .cs page
if (!IsPostBack)
            {
                radDate.DatePopupButton.Attributes.Add("onclick", "setCalendarTable();return false;");
                radDate.SelectedDate = Convert.ToDateTime(DateTime.Now.ToString("MMMM-yyyy"));
                 
            }


Is there any option to rectify this.

-Anto
Tsvetina
Telerik team
 answered on 29 Sep 2010
1 answer
109 views
Hello,

I have a grid which has the user's name and email. I have the form where there is a detailed information of the user and the other grid where it is more user information.

What I need is when i click on the row of the first grid (user's name and email), it should fill the form and the other grid.

How can I achieve this task ??

Thank you,
Parth
Mira
Telerik team
 answered on 29 Sep 2010
1 answer
105 views
Hi,

Can we do googlelike filtering on dataset. In the example you guys are doing filtering in sql query ( IN list_ItemsRequested Method). I am using stored procedure to get the data. So i cant use stored procedure. So is there any way to do filtering on dataset. If yes how to do it. Please Let me know. 

Thanks.
Iana Tsolova
Telerik team
 answered on 29 Sep 2010
3 answers
259 views
I have a RadMaskedTextBox in my html, and cannot place a value in it from a javascript function call. If I change the type of textbox to just a regular asp.net TextBox, the value comes in just fine (33331).

How can I manipulate either the RadMaskedTextBox or js function to accept the value from the js? Below is my code.

<telerik:RadMaskedTextBox ID="priInsZip" runat="server" Height="21px" Mask="#####"
                                                                                                                            Width="70px">
                                                                                                                        </telerik:RadMaskedTextBox>


<js code>

var priInsZip = document.getElementById("priInsZip");

priInsZip.value = InsZip;


</js code>
Cori
Top achievements
Rank 2
 answered on 29 Sep 2010
2 answers
155 views
I have a RadGrid inside a usercontrol inside a usercontrol inside the pageview of a RadTabStrip.  The InitInsert Command is firing, the cancel command is firing, but the PerformInsert command never fires.  What could possibly cause this?

Thanks.
Iana Tsolova
Telerik team
 answered on 29 Sep 2010
2 answers
111 views
I had an unsual issue I ran into. When filling a combobox text property from a database pull, my database was coming back with a value of "<no company>" and filling the combobox text property. When I tried to save data back to the database I get the following error, in my studio window (in attached file). If I manually remove the "<" character it is fine. I think the control somehow is having problems accepting the "<" character. It's an unusual condition but still may cause issues for users.


Kevin Kess


Cori
Top achievements
Rank 2
 answered on 29 Sep 2010
5 answers
168 views
I have created a very simple page with a button and the ajax compnents.  When I click the button, the update panel doesn't display in firefox but it does in IE.  I took this from one of the examples.  Is there something unique to Firefox?  The example works on the demo page, but when I remove the content code and place it on my page, it doesn't.

Thanks
<%@ Page Language="VB" %>
 
<%@ 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">
 
<script runat="server">
 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
        'simulate longer page load
        System.Threading.Thread.Sleep(2000)
    End Sub
    Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
        RadAjaxLoadingPanel1.EnableSkinTransparency = (TryCast(sender, CheckBox)).Checked
    End Sub
    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
        Dim position As New AjaxLoadingPanelBackgroundPosition()
        If DropDownList1.SelectedValue = "Bottom" Then
            position = AjaxLoadingPanelBackgroundPosition.Bottom
        End If
        If DropDownList1.SelectedValue = "BottomLeft" Then
            position = AjaxLoadingPanelBackgroundPosition.BottomLeft
        End If
        If DropDownList1.SelectedValue = "BottomRight" Then
            position = AjaxLoadingPanelBackgroundPosition.BottomRight
        End If
        If DropDownList1.SelectedValue = "Center" Then
            position = AjaxLoadingPanelBackgroundPosition.Center
        End If
        If DropDownList1.SelectedValue = "Left" Then
            position = AjaxLoadingPanelBackgroundPosition.Left
        End If
        If DropDownList1.SelectedValue = "None" Then
            position = AjaxLoadingPanelBackgroundPosition.None
        End If
        If DropDownList1.SelectedValue = "Right" Then
            position = AjaxLoadingPanelBackgroundPosition.Right
        End If
        If DropDownList1.SelectedValue = "Top" Then
            position = AjaxLoadingPanelBackgroundPosition.Top
        End If
        If DropDownList1.SelectedValue = "TopLeft" Then
            position = AjaxLoadingPanelBackgroundPosition.TopLeft
        End If
        If DropDownList1.SelectedValue = "TopRight" Then
            position = AjaxLoadingPanelBackgroundPosition.TopRight
        End If
        RadAjaxLoadingPanel1.BackgroundPosition = position
    End Sub
</script>
 
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 212px;
            height: 65px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="CheckBox1">
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="DropDownList1">
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div class="bigModule">
        <div class="bigModuleBottom">
            <p>
                <b>RadAjaxLoadingPanel</b> supports skinning and you can change its skin by setting
                the <b>Skin</b> property to the name of the respective skin. A <b>BackgroundPosition</b>
                property enables you to position the loading image in the loading panel. The <b>EnableSkinTransparency</b>
                property allows you to enable/disable default skin transparency.</p>
            <p>
                Please note that the loading images that are currently embedded in the Telerik.Web.UI
                assembly will not be available after Q1 2009.
            </p>
            <br />
        </div>
    </div>
 
        <table>
            <tr>
                <td style="width: 200px">
<asp:CheckBox ID="CheckBox1" runat="server" Text="EnableSkinTransparency" Checked="true"
AutoPostBack="true" OnCheckedChanged="CheckBox1_CheckedChanged" /><br />
                    <br />
                </td>
                <td>
                    Change Background Position:<br />
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                        <asp:ListItem>Bottom</asp:ListItem>
                        <asp:ListItem>BottomLeft</asp:ListItem>
                        <asp:ListItem>BottomRight</asp:ListItem>
                        <asp:ListItem Selected="True">Center</asp:ListItem>
                        <asp:ListItem>Left</asp:ListItem>
                        <asp:ListItem>None</asp:ListItem>
                        <asp:ListItem>Right</asp:ListItem>
                        <asp:ListItem>Top</asp:ListItem>
                        <asp:ListItem>TopLeft</asp:ListItem>
                        <asp:ListItem>TopRight</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
 
    <fieldset class="module1">
        <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px">
<asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click"
Style="margin-top: 15px; margin-left: 15px" CssClass="qsfButtonBigger" />
        </asp:Panel>
    </fieldset>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
adfadsfadsfasdfadsfadfas
    </telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>
Cori
Top achievements
Rank 2
 answered on 29 Sep 2010
1 answer
174 views
HI
I know this can be done but I am struggling with this. Please advise..

I have a grid in which one column is a the file name of a page in a website root.
I am using the default grid edit mode.

I have successfully got a combo box in edit mode to display a list of pages like this:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
  
            If e.Item.OwnerTableView.IsItemInserted Then
                'item is about to be inserted  
                Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
                Dim RCBx As RadComboBox = DirectCast(item.FindControl("RadComboBoxPageName"), RadComboBox)
                Dim dirInfo As New DirectoryInfo(Server.MapPath("~/"))
                RCBx.DataSource = dirInfo.GetFiles("*.aspx")
                RCBx.DataBind()
            Else
                'item is about to be edited  
            End If
        End If
  
    End Sub

Now, when inserting I need to get the selected value to bind to the grid column to save the data. How to do this in this scenario?


Also I can display the same list when editing but then I need it to default to the current column value, while still allowing an alternative to be selected from the combo box and then to Update.

Help greatly appreciated!

Thanks

Clive
Simon
Telerik team
 answered on 29 Sep 2010
2 answers
149 views
My requirement is "while clicking on the header instead of header text sorting should happen". Is it possible with radgrid?
Murugavel B
Top achievements
Rank 1
 answered on 29 Sep 2010
2 answers
98 views
Hello,

I am creating a grid programmatically inside of a user control following option 2 in the following link:

http://www.telerik.com/help/aspnet-ajax/grdprogrammaticcreation.html

My problem is that I am unable to filter on multiple columns. Filtering on one column works fine. When I try to filter a second column, the grid is only filtered by the second column. How can I implement a programmatically created grid that is recreated on every post-back that enables filtering on multiple columns?

Thanks,
Rick
Pavlina
Telerik team
 answered on 29 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?