This is a migrated thread and some comments may be shown as answers.

WPF Beta 2 Project Issues

3 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Congero
Top achievements
Rank 1
Congero asked on 18 Jul 2008, 09:09 PM
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

3 Answers, 1 is accepted

Sort by
0
P.Petrelli
Top achievements
Rank 1
answered on 19 Jul 2008, 12:50 PM

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.

0
Congero
Top achievements
Rank 1
answered on 19 Jul 2008, 01:51 PM

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

0
Nedyalko Nikolov
Telerik team
answered on 21 Jul 2008, 01:14 PM
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
Tags
General Discussions
Asked by
Congero
Top achievements
Rank 1
Answers by
P.Petrelli
Top achievements
Rank 1
Congero
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or