WPF Beta 2 Project Issues

4 posts, 0 answers
  1. Congero
    Congero avatar
    20 posts
    Member since:
    Sep 2012

    Posted 18 Jul 2008 Link to this post

    I was happily using the wpf beta 1 and developing a project prototype.  When the beta 2 was released I uninstalled beta 1 and installed beta 2 with the samples. Now when I try to drag a radgridview or gridviewdatacontrol onto the design surface in vs 2008 I get an "object reference not set to an instance of an object" error message.
    I'm also getting error messages when i try to run the samples the error messages are
    An error has occurred wide establishing a comection to the server. when cornectting to
    sQL Server 2005, this failure may be caused by the Fact that under the default setttings
    sQL sever does allow remote connections. (provider: Named Pipes Provider, error:
    40
    - Could not open a comection to SQL Server)

    and it appears it is trying to access a non existent instance of SQLExpress.  Can anyone help with these issues?
    Thanks for any assistance
  2. P.Petrelli
    P.Petrelli avatar
    2 posts
    Member since:
    Jun 2008

    Posted 19 Jul 2008 Link to this post

    Hi Reggie,

    You can try the following:

    1. Delete all Telerik dll files from the Bin folder.
    2. Remove all references to Telerik files from your project
    3. Delete this from the xaml file:

    xmlns:my="clr-namespace:Telerik.Windows.Controls.UI;assembly=Telerik.Windows.Controls.UI" 

    4. Drag and drop the RadGridView again.

    About the error messages you receive when you run the samples, have you tried adjusting the connection string inside the app.config file?
    By default it looks like this:

    <connectionStrings> 
            <add name="Telerik.Windows.Examples.Properties.Settings.NorthwindConnectionString" 
                connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DataSources\Northwind.mdf;Integrated Security=True;User Instance=True" 
                providerName="System.Data.SqlClient" /> 
        </connectionStrings> 
     

     
    So, it tries to connect to the SQLExpress instance on your computer. If you are using SQL Server 2005 - you need to change Data Source to point to your local server and delete the User Instance = True.

    Also you will need to start the SQLEXPRESS/SQL2005 service.

    I hope this helps.

  3. Congero
    Congero avatar
    20 posts
    Member since:
    Sep 2012

    Posted 19 Jul 2008 Link to this post

    Hi  P.Petrelli
    Thanks for the suggestions you have provided for this is a rather perplexing problem.
    I tried the 4 steps you outlined
    1. Delete all Telerik dll files from the Bin folder.
    2. Remove all references to Telerik files from your project
    3. Delete this from the xaml file:

    xmlns:my="clr-namespace:Telerik.Windows.Controls.UI;assembly=Telerik.Windows.Controls.UI" 

    4. Drag and drop the RadGridView again.

    I even deleted the page and created a new page.

    I still received the error message "object reference not set to an instance of an object"
    I also uninstalled/reinstalled beta 2 again.
    I am still open to any suggestions....thanks

  4. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 21 Jul 2008 Link to this post

    Hello Reggie Tyler,

    Here is the answer for people that may have same problem, I also send this personally to you.

    Maybe you can't add RadGridView from the VS2008 toolbox, because VS holds reference for RadGridView from beta 1, so when you add instance of RadGridView onto Design surface of VS2008 you get "object reference not set to an instance of an object" error message. The solution to that problem is to delete RadGridView from your toolbox and add it again from "C:\Program Files\Telerik\RadControls for WPF\Binaries\Telerik.Windows.Controls.UI.dll" (of course this is default location if you choose other "install location" durring installation you have to change path with correct one).

    I can't reproduce your SQL Server-related error message but I think that solution from P.Petrelli may help if you (change connetion string inside the C:\Program Files\Telerik\RadControls for WPF\CSharp\app.config or C:\Program Files\Telerik\RadControls for WPF\VB.NET\app.config file). If problem persist send me new connection string and if possible screenshot of the error. Since you mentioned that the example project tries to access a nonexistant instance of SQL Express, can you confirm that you do not have SQL Express installed? The default connection string does look for .\SQLExpress. Does changing the DB instance in the connection string to the correct name fix the problem?

    All the best,
    Author Nedyalko Nikolov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top