Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
I have two tables that are related. Is it possible to do Automatic CRUD operations that populate and update both tables?
I tried to create a view that joins both tables and entered that view into my model but I get an error:  Additional information: Invalid object name 'voa_keygen'. Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'voa_keygen'. ---> System.Data.SqlClient.SqlException: Invalid object name 'voa_keygen'.

Below are my two tables:

CREATE TABLE [dbo].[Security_Role_To_Webpage](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [webpage_name] [varchar](200) NULL,
    [security_role_id] [int] NULL,
    [add_privledge] [bit] NULL,
    [edit_privledge] [bit] NULL,
    [delete_privledge] [bit] NULL,
    [view_privledge] [bit] NULL,
 CONSTRAINT [PK_security_role_to_webpage] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
 
GO
 
SET ANSI_PADDING OFF
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_add_privledge]  DEFAULT ((0)) FOR [add_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_edit_privledge]  DEFAULT ((0)) FOR [edit_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_delete_privledge]  DEFAULT ((0)) FOR [delete_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_view_privledge]  DEFAULT ((0)) FOR [view_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage]  WITH CHECK ADD  CONSTRAINT [FK__security___secur__60A75C0F] FOREIGN KEY([security_role_id])
REFERENCES [dbo].[Security_Role] ([ID])
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] CHECK CONSTRAINT [FK__security___secur__60A75C0F]
GO


CREATE TABLE [dbo].[Security_Role](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [Role] [varchar](100) NULL,
 CONSTRAINT [PK_security_role] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
 
GO
 
SET ANSI_PADDING OFF
GO


When trying to update or add to two related tables in the radgrid is this a case where you HAVE to use manual CRUD operations?

Thanks!
David
Top achievements
Rank 1
 answered on 06 Feb 2015
2 answers
162 views
Hi, I'm trying to bind my grid to an MVC JsonResult.  The MVC action is getting hit and returning JSON that I can see in Fiddler.  I'm just trying to return one row right now just to verify it will work. The grid ends up 10 empty rows and no data.  Any assistance would be appreciated.  Below is my databinding section from grid and my MVC JsonResult action method.


<DataBinding SelectMethod="GetAttachmentData" Location="/FaceToFaceAttachmentUpload" SortParameterType="List" FilterParameterType="List" ResponseType="JSONP"/>



[WebMethod]
public JsonResult GetAttachmentData(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)
{
List<IAttachment> attachments = new List<IAttachment>();
attachments.Add(new Attachment() { ID = 1, TypeDesc = "test" });
return Json(new { results = attachments });
}
Bob
Top achievements
Rank 1
 answered on 06 Feb 2015
1 answer
73 views
Hello,
I am trying to use the radGrid to do something simple at first as I learn more about it. 
I have the grid inside a div and I have linked the grid to an OpenAccessLinqDataSource.
I manually added a record in the underlying table to get it to show inside the grid.
That part worked and it shows. I enabled the AllowAutomaticInserts, Updates, and Deletes
options. When I click the Edit button in the grid, it shows the update screen but when
I change any data then click Update, the grid reverts back to old values and nothing
is changed in the database. The same goes for Delete, nothing happens. 
I am sure I am doing something wrong because of ignorance at this point.

Here is a code listing of how I have the radgrid setup.

<div class="WebpageManagementBox">
 
       <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" DataSourceID="OpenAccessLinqDataSource1" GroupPanelPosition="Top" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
           <ClientSettings>
               <Scrolling AllowScroll="True" UseStaticHeaders="True" />
               <Selecting AllowRowSelect="true" />
           </ClientSettings>
           <MasterTableView DataSourceID="OpenAccessLinqDataSource1" AutoGenerateColumns="false">
               <Columns>
 
                    <telerik:GridBoundColumn DataField="Webpage_name" ItemStyle-Width="100px" FilterControlAltText="Filter Webpage_name column" HeaderText="Webpage_name" ReadOnly="True" SortExpression="Webpage_name" UniqueName="Webpage_name">
                       <ColumnValidationSettings>
                           <ModelErrorMessage Text="" />
                       </ColumnValidationSettings>
                   </telerik:GridBoundColumn>
 
 
                   <telerik:GridCheckBoxColumn DataField="Add_privledge"  DataType="System.Boolean" FilterControlAltText="Filter Add_privledge column" HeaderText="Add_privledge" ReadOnly="False" SortExpression="Add_privledge" UniqueName="Add_privledge">
                   </telerik:GridCheckBoxColumn>
                   <telerik:GridCheckBoxColumn DataField="Edit_privledge" DataType="System.Boolean" FilterControlAltText="Filter Edit_privledge column" HeaderText="Edit_privledge" ReadOnly="False" SortExpression="Edit_privledge" UniqueName="Edit_privledge">
                   </telerik:GridCheckBoxColumn>
                   <telerik:GridCheckBoxColumn DataField="Delete_privledge" DataType="System.Boolean" FilterControlAltText="Filter Delete_privledge column" HeaderText="Delete_privledge" ReadOnly="False" SortExpression="Delete_privledge" UniqueName="Delete_privledge">
                   </telerik:GridCheckBoxColumn>                   
                   <telerik:GridCheckBoxColumn DataField="View_privledge" DataType="System.Boolean" FilterControlAltText="Filter View_privledge column" HeaderText="View_privledge" ReadOnly="False" SortExpression="View_privledge" UniqueName="View_privledge">
                   </telerik:GridCheckBoxColumn>
                   
               </Columns>
           </MasterTableView>
       </telerik:RadGrid>
 
   </div>
 
   <telerik:OpenAccessLinqDataSource ID="OpenAccessLinqDataSource1" runat="server" ContextTypeName="GATEModel.EntitiesModel" EntityTypeName="" ResourceSetName="Security_Role_To_Webpages" Select="new (Add_privledge, Delete_privledge, Edit_privledge, Security_role_id, View_privledge, Webpage_name)">
   </telerik:OpenAccessLinqDataSource>

Also here is a create script of the underlying table.

USE [GATE]
GO
 
/****** Object:  Table [dbo].[Security_Role_To_Webpage]    Script Date: 2/6/2015 7:51:36 AM ******/
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
SET ANSI_PADDING ON
GO
 
CREATE TABLE [dbo].[Security_Role_To_Webpage](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [webpage_name] [varchar](200) NULL,
    [security_role_id] [int] NULL,
    [add_privledge] [bit] NULL,
    [edit_privledge] [bit] NULL,
    [delete_privledge] [bit] NULL,
    [view_privledge] [bit] NULL,
 CONSTRAINT [PK_security_role_to_webpage] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
 
GO
 
SET ANSI_PADDING OFF
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_add_privledge]  DEFAULT ((0)) FOR [add_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_edit_privledge]  DEFAULT ((0)) FOR [edit_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_delete_privledge]  DEFAULT ((0)) FOR [delete_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] ADD  CONSTRAINT [DF_Security_Role_To_Webpage_view_privledge]  DEFAULT ((0)) FOR [view_privledge]
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage]  WITH CHECK ADD  CONSTRAINT [FK__security___secur__60A75C0F] FOREIGN KEY([security_role_id])
REFERENCES [dbo].[Security_Role] ([ID])
GO
 
ALTER TABLE [dbo].[Security_Role_To_Webpage] CHECK CONSTRAINT [FK__security___secur__60A75C0F]
GO

David
Top achievements
Rank 1
 answered on 06 Feb 2015
3 answers
155 views
Hello Support Team,

We are having a rad window on secure page and its working fine except its closing. It's not able to find the current window with https
Following is code for that.

function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }

function fnCnCancelData() {
      
        var oWindow = GetRadWindow();

        oWindow.Close();
    }

It's working fine if We remove Https but if we put Https its giving following error

Cannot read property 'radWindow' of undefined in GetRadWindow() function.

We are using telerik asp.net ajax 2010 license version. Please do reply on this as due to this we are enable to launch our client and it's a kind of 911 emergency.

Best Regards,
Jalpesh
Marin Bratanov
Telerik team
 answered on 06 Feb 2015
1 answer
160 views
Hello Team,
I am trying to open an HTTPS page from another HTTPS page using Rad Window, but will not work. My scenario is like the following, please help.

Scenario
Parent page is https://parentpage.aspx
Child page is https://childpage.aspx

I am trying to open the child page from the parent page using below script.

var oWindow = window.radopen(‘https://childpage.aspx’,'windowname');
Marin Bratanov
Telerik team
 answered on 06 Feb 2015
15 answers
162 views
Hi, 

since upgrade 2012.3.1205.35, hyperlinks and button inside RadScheduler appointment templates does not work. I made a client click working by handling the "ontouchend" event. I also have a span in my template that opens a radToolTip and it won't open anymore either. Can I do something to make all my clicks work as they were in previous telerik versions and in desktop verrsions? 

I can also reproduce the bug in Chrome with user agent "Ipad - IOS 5 " and "Emulate touch events" checked

Tommy
Boyan Dimitrov
Telerik team
 answered on 06 Feb 2015
5 answers
145 views
The problem can be seen in the Telerik content filters example editor:

http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultvb.aspx

steps to reproduce using Firefox:

1. delete all the content in the editor
2. uncheck ConvertToXhtml in the filter list and click Update
3. switch the editor to HTML mode

a <br> tag has been added

you can delete the tag, but it will be added again when you switch to Design mode or back to HTML mode.

You can view a screencast demonstrating the problem here:  http://screencast.com/t/qMMGMs5z6

Note that switching the editor to HTML mode is not necessary for the <br> tag to be added. In our application, we set the editor .Content property to an empty string on the server during page load. When the page is posted back, the .Content property contains the <br>.

Stanimir
Telerik team
 answered on 06 Feb 2015
2 answers
260 views
I have a javascript function on a Webform which I call from code behind like below. It works fine without the RadAjaxManager.
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>

As soon as I add the script manager and fire the javascript, I get an error in the DOM saying:
JavaScript critical error at line 343, column 42 in http://localhost:32135/3DPrototypeQuote.aspx\n\nSCRIPT1004: Expected ';' 

Note there is a semicolon missing between NovaCopyStlViewer('/assets/Inverted.stl') and Sys.Application.add_init(function()) , here is where the Visual Studio is telling me there is a semi colon missing. 

<script type="text/javascript">
//<![CDATA[
NovaCopyStlViewer('/assets/Inverted.stl')Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[],"clientEvents":{OnRequestStart:"",OnResponseEnd:""},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"ctl00$ContentPlaceHolder1$RadAjaxManager1","updatePanelsRenderMode":0}, null, null, $get("ctl00_ContentPlaceHolder1_RadAjaxManager1"));
});
//]]>
</script>








 try
            {
                FileUpload fileUpload = FileUploadControl;

                string physicalFolder = Server.MapPath("~/assets/");
                if (fileUpload.HasFile)
                {
                    string uploadFile = physicalFolder + fileUpload.FileName;
                    fileUpload.SaveAs(uploadFile);

                    string testFile = "/assets/" + fileUpload.FileName;
   
                   ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "NovaCopyStlViewer('" + testFile + "')", true);
                }
            }
            catch (Exception)
            {

                throw;
            }



 <script type="text/javascript">
        function NovaCopyStlViewer(file)
        {

            var cv = document.getElementById('canvas_drop');
            cv.style.display = 'block';

            var e = document.getElementById('select_options');
            e.style.display = 'block';

            var mycanvas = document.getElementById('upload_canvas');
            var viewer = new JSC3D.Viewer(mycanvas);
            var theScene = new JSC3D.Scene;

            var stlpath = file;
            viewer.setParameter('SceneUrl', stlpath);
            viewer.setParameter('InitRotationX', 20);
            viewer.setParameter('InitRotationY', 20);
            viewer.setParameter('InitRotationZ', 0);
            viewer.init();
            viewer.update();
        }
    </script>























Felix
Top achievements
Rank 1
 answered on 06 Feb 2015
1 answer
107 views
Hi team,

I have a aspx page with two linkbuttons(mytoolkits and all toolkits). The scenario is when I am clicking on my toolkit my radgrid is binding into athe mytoolkit datatable and when I am clicking on all toolkits the same radgrid is binding to alltoolkits datatable. my problem is that radgrid is working well in all cases (filter mode and edit mode when I am clicking on my toolkits linkbutton) but when I am clicking on the all toolkits radgrid is missing the styles in filter and edit mode that it means all the datepickers popup button is disappear and the text( open the popup ..) will appear and all calendars in edit mode and filtering have no style and it is opening somewhere in the page and it happens just in IE9.  
what I did to fix this issue?
1- searched so much and set the EnableAjaxRendering=true for radgrid and datepickers of that columns in page-load and it didn't work.
2- when I used radstylesheet manager it was creating the 31 error and it wasn't change anything.

the radgrid is in the RadajaxPanel and something that is interesting is when I add a Raddatepicker control to the page out of the radgrid so far that the raddatepicker is before Radgrid even after post back of all toolkits it works well. but when I add that raddatepicker after Radgrid (either inside ajaxPanel or outside of it) it get's the same issue of the other raddatepickers in radgrid and is losing it's skin. would you please let me know what is wrong with it?










Maria Ilieva
Telerik team
 answered on 06 Feb 2015
3 answers
834 views
Is it possible to Enable or disable the Tab strip based on the Rad Grid Condition. I have Three Tabs and each tab has a RadGrid in it. When a Grid is in Edit mode, I want to Disbale the TasbStrip so that users can not move to a different Tab. Once the users either update or cancel the edit Tab Strip should be enabled back.

I tried setting Tabstrip.enabled to false on Grid Prerender and Item Command, but did not work.

Thanks for your help and advice.

Thanks,
Siva
Ivan Danchev
Telerik team
 answered on 06 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?