Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
78 views
How can I set values for two handlers in a rad slider... When I move my handlers, the respective value of my handler should be displayed.. Can anyone help me??? I do not need the tool tip sample.. I want to display in two textboxes..
Slav
Telerik team
 answered on 03 Dec 2012
3 answers
192 views
I'm trying to manually insert a row into an SQL table through the RadGrid's insert row function.  My problem is that the InsertCommand event will not fire.  Here's some code:

<telerik:RadGrid ID="grdDesc" runat="server" AutoGenerateColumns="false">
    <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="Descrip"
      InsertItemPageIndexAction="ShowItemOnCurrentPage" ShowHeader="false">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="Edit">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="Descrip" UniqueName="Descrip">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Scrolling UseStaticHeaders="true" AllowScroll="true" />
    </ClientSettings>
</telerik:RadGrid>
 
<telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
    <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">
    </telerik:TextBoxSetting>
</telerik:RadInputManager>


Visual Basic code:
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    ...
    Dim ctxSql As LINQtoSQLDataContext = New LINQtoSQLDataContext()
 
    If chkDesc.Checked = True Then
        grdDesc.Visible = True
        Dim descrips = From c In ctxSql.COMBOBOXes Where c.fieldname = "DESCRIP" Select New With {c.descrip}
 
        grdDesc.DataSource = descrips
        grdDesc.DataBind()
    Else
        grdDesc.Visible = False
    End If
    ...
End Sub
 
 
Protected Sub grdDesc_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles grdDesc.ItemCreated
    If TypeOf e.Item Is GridEditableItem AndAlso (e.Item.IsInEditMode) Then
        Dim editableItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
 
        Dim textBox = (DirectCast(editableItem.EditManager.GetColumnEditor("Descrip"), GridTextBoxColumnEditor)).TextBoxControl
 
        textBox.ID = "TextBox1"
        Dim inputSetting As InputSetting = RadInputManager1.GetSettingByBehaviorID("TextBoxSetting1")
        inputSetting.TargetControls.Add(New TargetInput(textBox.UniqueID, True))
        inputSetting.InitializeOnClient = True
        inputSetting.Validation.IsRequired = True
    End If
End Sub
 
Protected Sub grdDesc_InsertCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles grdDesc.InsertCommand
    Dim ctxSql As LINQtoSQLDataContext = New LINQtoSQLDataContext()
 
    Dim custFileID = ctxSql.CUSTFILEs.Where(Function(c) c.CUSTNO = cboCustNew.SelectedValue).Single.CUSTFILE
 
    Dim newComboBox As COMBOBOX = New COMBOBOX()
    newComboBox.custfile = custFileID
    newComboBox.department = -1
    newComboBox.fieldname = "DESCRIP"
    newComboBox.descrip = ""
 
    ctxSql.COMBOBOXes.InsertOnSubmit(newComboBox)
End Sub

I can tell you the ItemCreated event DOES fire and runs successfully.  I just don't understand why the InsertCommand event doesn't fire.  If anybody can tell me what I'm missing, it would be appreciated.

Thanks,
Patrick
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Dec 2012
18 answers
1.2K+ views
Hello!

When I'm exporting to Excel (HTML or ExcelML) and when I'm opening exported file I'm getting this error/notification:

"The file you are trying to open, '[filename]', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"  (Yes | No | Help)

Is there any workaround (without changing registry/excel settings) for this to make excel not showing this question?

Thanks

EDIT: Ok. I've found solution for my problem here:

http://www.grinn.net/blog/dev/2008/06/file-you-are-trying-to-open-is-in.html
Daniel
Telerik team
 answered on 03 Dec 2012
2 answers
112 views



Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Dec 2012
2 answers
96 views
I have a hierarchical grid that I have been implementing security on.

What I have done is limit the user to see only data they are allowed to see. So in the databind I skip over it if the user does not have access to that level of detail.  I would also like to remove the expand if they dont have access to the detailed info. Anyway to do that?
John Giblin
Top achievements
Rank 1
 answered on 03 Dec 2012
4 answers
678 views
Hi there, I have a context menu showing when the radgrid is right clicked which displays options "email user", "email mass users", "email users who have finished".

I have a radgrid which is populated with data which shows whether users have started or not started their courses. I have a column called "HasStarted" which displays false and true depending on whether or not they have started. When I right click on a row which has "HasStarted" as false I want "email user", "email mass users" to appear in the context menu and when I click on a row which has "HasStarted" as true I want "email users who have finished" to only appear in the context menu. The context menu works and the items run the correct cases just not sure how to hide and show certain items depending on the item clicked on. Any help will be appreciated thanks.


James
Top achievements
Rank 1
 answered on 03 Dec 2012
3 answers
62 views
hi,
I'm making some test on your ajax grid and I've found it great but I've found an annoying problem regarding column resize.

This problem is present in your demo as well so you can easly verify it.
Go to http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx

Try to resize column by clicking between "Address" and "Postal Code", all columns width are affected by this action and their width change.
Please let me know if there is a way to work around this behaviour.

thanks a lot for your help
Pavlina
Telerik team
 answered on 03 Dec 2012
1 answer
99 views
Hi,

I have a Rad Grid control that is bound to a data source which has objects in it.
I use the object properties to feed the template in the template columns.

Please show me how can I implement custom filtering, which events do I need to handle ?
I need a way from which I can use the object and then decided if this row should be filtered or not.
The out of the box filtering is not going to work for my case.

I cant find any examples, please help.

Thanks
Karan
Maria Ilieva
Telerik team
 answered on 03 Dec 2012
1 answer
139 views
Hi All,
 
I have radchart with multiple series and one series is adopt with bar chart and second series is adopt with line chart. line chart series coming from second Y-Axis. My need is from this line chart should not be display behind bar chart.

I need to display line chart above bar chart. But in default barchart overrides line chart.

How to solve this?

Thanks in Advance..
Evgenia
Telerik team
 answered on 03 Dec 2012
1 answer
195 views
I am not sure if it is an Ajax-specific problem, or, just a Rad script issue... but, if I have a form inside the default page form, Telerik controls do not seem to work (it throws an error).  If I remove this sub form, things work.

Here is sample code:

<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="current_sswdc._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <title>Test</title>
    <script language="JavaScript" type="text/javascript">
<!--
 
        function setinitialStatus() {
            window.status = "This is a test of Telerik with inside forms to PayPal.";
        }
// end -->
    </script>
    <script type="text/javascript">
 
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-26024342-1']);
        _gaq.push(['_trackPageview']);
 
        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
 
    </script>
    <style type="text/css">
        body
        {
            font-family: Sans-Serif;
            font-size: 12px;
            font-weight: normal;
            width: 100%;
        }
        .maincontainer
        {
            width: 850px;
            margin-left: auto;
            margin-right: auto;
        }
         
        .header
        {
            text-align: center;
            font-weight: bold;
            font-size: 14px;
            width: 100%;
            padding: 8px;
        }
        .content
        {
            font-family: Sans-Serif;
            font-size: 12px;
            width: 840px;
            padding-left: 6px;
            padding-right: 6px;
            margin-left: auto;
            margin-right: auto;
        }
    </style>
</head>
<body onload="setinitialStatus();" bgcolor="#DDF0FF">
    <a name="top"></a>
    <div id="fb-root" style="text-align: center; width: 100%;">
        <script language="JavaScript" type="text/javascript">
<!--
            window.fbAsyncInit = function () {
                FB.init({ appId: '113869198637480', status: true, cookie: true,
                    xfbml: true
                });
            };
            (function () {
                var e = document.createElement('script'); e.async = true;
                e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
                document.getElementById('fb-root').appendChild(e);
            } ());
// end -->
        </script>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <div class="maincontainer">
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="850px">
                <div class="header">
                    <table width="100%" border="1" cellspacing="1" cellpadding="6" bgcolor="#F2F8FF">
                        <tr>
                            <td valign="top" align="center" bgcolor="#F2F8FF">
                                <b>Please help:</b><br />
                                <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                <input type="hidden" name="cmd" value="_s-xclick" />
                                <input type="hidden" name="hosted_button_id" value="CF7R54YWE5NVJ" />
                                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
                                    name="submit" alt="PayPal - The safer, easier way to pay online!" />
                                <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"
                                    width="1" height="1" />
                                </form>
                            </td>
                            <td valign="top" align="center" bgcolor="#F2F8FF" colspan='1'>
                                <div style="text-align: center; font-family: verdana;">
                                    <h1>
                                        Welcome</h1>
                                    <h3>
                                        subtitle</h3>
                                    <i>something here</i>
                                </div>
                            </td>
                            <td valign="top" align="center" bgcolor="#F2F8FF">
                                <b>Please help:</b><br />
                                <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                <input type="hidden" name="cmd" value="_s-xclick" />
                                <input type="hidden" name="hosted_button_id" value="CF7R54YWE5NVJ" />
                                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
                                    name="submit" alt="PayPal - The safer, easier way to pay online!" />
                                <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"
                                    width="1" height="1" />
                                </form>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="content">
                    <telerik:RadDatePicker ID="rdpDateToView" runat="server" AutoPostBack="True" Culture="en-US">
                        <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                            ViewSelectorText="x">
                        </Calendar>
                        <DateInput runat="server" AutoPostBack="True" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy"
                            LabelWidth="40%" value="11/27/2012">
                        </DateInput>
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                    </telerik:RadDatePicker>
                    <br />
                    <br />
                    <strong>Date Picked:</strong>
                    <asp:Label ID="lblDatePicked" runat="server" Text=""></asp:Label>
                    <br />
                    <br />
                    This is some test text. yeah. adf asdf asdf asd;fja kdsfjalsdkfj hdlkf haldhrauha
                </div>
            </telerik:RadAjaxPanel>
        </div>
        </form>
    </div>
</body>
</html>


Here is the code-behind:

Imports Telerik.Web.UI
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub rdpDateToView_SelectedDateChanged(sender As Object, e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs) Handles rdpDateToView.SelectedDateChanged
        lblDatePicked.Text = e.NewDate.ToString
    End Sub
 
End Class

So - the PayPal forms are what break this.  I cannot find a way around having the PayPal forms - somehow, I have to be able to use forms inside the main page form.  Does anyone have some insight as to how I can resolve this conflict?

Thanks.
Maria Ilieva
Telerik team
 answered on 03 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?