Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
I'm working on a project where they want us to prevent any of the users from pasting into the RadEditor, and I was able to get it working in IE and Firefox (finally), but Chrome just lets me paste right into the box and I cant seem to make it stop. The JavaScript I am using to prevent Pasting is as follows.

<script type="text/javascript" language="javascript">
 
    // Prevents pasting into RadEditor
    // from RadEditor menu and Context menu
    function OnClientCommandExecuting(editor, args) {
 
        var commandName = args.get_commandName();
 
        if (commandName == "PasteFromWord"
        || commandName == "PasteFromWordNoFontsNoSizes"
        || commandName == "PastePlainText"
        || commandName == "PasteAsHtml"
        || commandName == "Paste") {
 
            args.set_cancel(true);
        }
        //alert(commandName);
    }
 
    // Prevents pasting into RadEditor
    // by pressing Ctrl + V
    function OnClientLoad(editor) {
 
        editor.attachEventHandler("onkeydown", function (e) {
 
            if (e.ctrlKey && e.keyCode == 86) {
 
                if (document.all) {
                    e.cancelbubble = true;
                    e.returnvalue = false;
                    return false;
                }
                else {
                    e.preventdefault();
                    return false;
                }
            }
 
        });
 
        // Prevents Firefox from loading the context menu.
        editor.attachEventHandler("oncontextmenu", function (e) {
            if (e.preventDefault) e.preventDefault();
            if (e.stopPropagation) e.stopPropagation();
            return false;
        });
    
</script>
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
194 views
Hi

I'm new to the scheduler and I can't figure out what the RecurrenceParentID is? Then as long as I'm starting a thread, if anyone could explain an eloquent way of calendar filtering. I guess telerik calls it 'Resources'. Basically I want to adapt one the teleril examples where you could see the calendar for different people or all at the same time. I would like to have three check boxes to the side of my calendar that if the the box is checked those calendar appointments will show. Anyone know a good way about accomplishing this?

Thanks

Mike
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
62 views
Hello. I need to select the row index of the grid by using javascriptfunction .. first get the index of selected then select the next. sorry for bad english .. Help? 
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
1 answer
161 views
Hi,
 I have radgrid with column resizing and resize to fit set to true. I want to set max and min width for each column so that it should not shrink less OR expand more than min and max width while both resizing any column and resizing to fit.?

Thanks,
Mahesh
Princy
Top achievements
Rank 2
 answered on 08 Feb 2012
0 answers
77 views
hi everybody, i am trying to reproduce this scenario http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx its working but i have a problem i have a DropDownList that i populate with a different datasource and when i want to add a register or update give an error this is a llittle of my code
<grid..........................
.....
.
.
.
<EditFormSettings  CaptionFormatString="Editar Proveedor: {0}" CaptionDataField="COD_PROVEE" EditFormType="Template" EditColumn-EditText="Editar" EditColumn-UpdateText="Modificar" PopUpSettings-Width="780px" PopUpSettings-Height="300px" PopUpSettings-Modal="True" PopUpSettings-ZIndex="2000">
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
     <FormTemplate>
<label>CUENTA:</label>
                                      
                                <asp:DropDownList ID="DropDownList5" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDataSource2" SelectedValue='<%# Bind("cuenta") %>'
                    DataTextField="cuenta" DataValueField="cuenta">
                                </asp:DropDownList>
                    
                                </div>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:SICI2.0ConnectionString %>"
                        SelectCommand="SELECT * FROM [TBL_PROVEEDOR]"
                        
                        UpdateCommand="UPDATE TBL_PROVEEDOR SET NOMPROVEE = @NOMPROVEE, CONTACTO = @contacto, TELPROVEE = @TELPROVEE, DIRPROVEE = @DIRPROVEE, DIASCREDITO = @DIASCREDITO, CODIGO = @codigo, tipocontribuyente = @tipocontribuyente, nit = @nit, pais = @pais, cuenta = @cuenta, tipo_sociedad = @tipo_sociedad, montocredito = @montocredito WHERE (COD_PROVEE =@COD_PROVEE)"
                        InsertCommand="INSERT INTO TBL_PROVEEDOR(NOMPROVEE, CONTACTO,TELPROVEE,DIRPROVEE,DIASCREDITO, CODIGO, tipocontribuyente,nit,pais,cuentas,tipo_sociedad,montocredito) VALUES (@NOMPROVEE,@contacto ,@TELPROVEE,@DIRPROVEE,@DIASCREDITO,@codigo, @tipocontribuyente, @nit,@pais,@cuenta,@tipo_sociedad,@montocredito)">
                        <UpdateParameters>
                            <asp:Parameter Name="NOMPROVEE" Type="String" />
                            <asp:Parameter Name="contacto" Type="String"/>
                            <asp:Parameter Name="TELPROVEE" Type="String"/>
                            <asp:Parameter Name="DIRPROVEE" Type="String" />
                            <asp:Parameter Name="DIASCREDITO" Type="Int32"/>
                            <asp:Parameter Name="codigo" Type="String" />
                            <asp:Parameter Name="tipocontribuyente" Type="String" />
                            <asp:Parameter Name="nit" Type="String" />
                            <asp:Parameter Name="pais" Type="String" />
                            <asp:Parameter Name="cuenta" Type="String"/>
                            <asp:Parameter Name="tipo_sociedad" Type="String" />
                            <asp:Parameter Name="montocredito" Type="Decimal" />
                            <asp:Parameter Name="COD_PROVEE" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="NOMPROVEE" />
                            <asp:Parameter Name="contacto" />
                            <asp:Parameter Name="TELPROVEE" />
                            <asp:Parameter Name="DIRPROVEE" />
                            <asp:Parameter Name="DIASCREDITO" />
                            <asp:Parameter Name="codigo" />
                            <asp:Parameter Name="tipocontribuyente" />
                            <asp:Parameter Name="nit" />
                            <asp:Parameter Name="pais" />
                            <asp:Parameter Name="cuenta" />
                            <asp:Parameter Name="tipo_sociedad" />
                            <asp:Parameter Name="montocredito" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:CONTASConnectionString %>"
        SelectCommand="SELECT [ncuenta], [cuenta] FROM [tbl_c_cuenta]">
    </asp:SqlDataSource>
thank u for ur help
Robert
Top achievements
Rank 2
 asked on 07 Feb 2012
1 answer
127 views
I'm following your resource filtering demo here (http://demos.telerik.com/aspnet-ajax/scheduler/examples/resources/defaultcs.aspx) with the latest controls (2011.3.1324.40). The only difference between my code and yours is that I'm binding to a list of objects in my Page_Init and you are binding to a datasource control. Also, your filter controls autopostback, but mine require the user to click an "Apply Filters" button. The click event for the button does the same thing though, it calls ReBind() on the RadScheduler control. Sure enough, I see the DataBound event fire, but the AppointmentDataBound events never do. That's where your code (and mine, by extension) hides certain appointments based on the filters selected, so it kind of needs to be firing on Rebind. Any ideas what would prevent that event from firing?
ATS
Top achievements
Rank 1
 answered on 07 Feb 2012
3 answers
96 views
Hi

I am writing a web appication rather than a web site so I have information available to me that I would not normally know.
For instance in this case, I have got 4 files on a client disk - 3 images and 1 video.

On the web page I already know where the files are stored and what the filenames are before I draw the page.
All I want to do is to pre-populate the 4 radupload edit boxes with the filenames amd paths so that all the user has to do when they open the page is to click the Upload button and all 4 files can then be uploaded.

I cannot find any obvious way to do this with the radupload control?

Can anybody steer me in the right direction here?

Thanks
Mick
Kevin
Top achievements
Rank 2
 answered on 07 Feb 2012
0 answers
66 views
Hi,

I'm trying to use a RadMenu to select some hierarchical data. I feed the data from a DataTable fine and the hierarchy works when specified, however I would actually like this data to populate at the 3rd tier of the menu. i.e. I'd like the structure as follows:

Category -> Shop -> heirachical data for Shop
-> Fuel -> heirachical data for Fuel

Both shop and fuel data use the ID to ParentID relationship and can be combined into a single DataTable with the differentiating factor being a dummy column with either "shop" or "fuel" (ofc this data could be provided as 2 tables instead). I would like Category to be the root - this is static and does not need to come from the datasource, tho I could add another dummy column "Category" to the query if required.

Is there a way to populate from the 2 data sources at the Shop and Fuel level (shop and fuel are also static and can be specified in advance)?

Any help with this would be greatly appreciated.

Cheers,
Christian
Christian
Top achievements
Rank 1
 asked on 07 Feb 2012
5 answers
135 views
I notice a problem in the Rad-editor when trying to select a link and open the Hyperlink pop-up, sometimes the "properties" option shows up but the data from the link is not being passed to the hyperlink popup. This issue is happening in our app and also in the rad editor demo page.

I have prepared a video demonstrating this Issue. What can I do to "fix" this problem?
http://screencast.com/t/gVgnxdGahUb

Thanks in advance.
Douglas
Top achievements
Rank 1
 answered on 07 Feb 2012
1 answer
103 views
I have a tree that looks like this:

Each entry is follow by the letter 'e'. Clicking on the text of the node displays the assets to which the nodes is pointing. Clicking on the 'e' bring up the definition of the node in a pop up window. Unfortunately when the user clicks on a 'e' in different node than is displayed the display changes to that node (a bad thing) and the pop-up is displayed. Is there any way of preventing the clicks of the 'e' from displaying the assets.

Here is the definition of the tree
<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" MultipleSelect="True"
    EnableViewState="true" ShowLineImages="False" EnableEmbeddedSkins="False" Skin="tree_2"
    OnNodeClick="RadTreeView1_NodeClick" OnNodeDataBound="RadTreeView1_NodeDataBound">
   <NodeTemplate>
        <small>
            <asp:Label ID="lblnodeText" Text='<%#Eval("Title") %>' runat="server" /><asp:Label
                ID="lblCatId" Text='<%#Eval("Id") %>' runat="server" Visible="false"></asp:Label><asp:Label
                    ID="lblisCustomer" Text='<%#Eval("isCustomer") %>' runat="server" Visible="false"></asp:Label><asp:Label
                        ID="Description" runat="server" Text='<%#Eval("description") %>' Visible="false" /><asp:HiddenField
                            ID="DescriptionVisible" runat="server" Value='<%#Eval("descriptionVisible") %>' />
        </small>
        <small><a href="javascript:Popup_Window('category_detail','<%# Eval("id") %>')" style="text-decoration: none;">
            <span style="color: #BBBBBB">e</span></a></small></NodeTemplate>
</telerik:RadTreeView>
Bozhidar
Telerik team
 answered on 07 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?