Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
UltraGrid Designer and LINQ to SQL
posted

Hi everyone,

 

I am newbie in Visual Studio 2008 ( I am moving into this platform from other programming language ).

Actually I am in the middle of selecting 3rd party components for my application.

I have selected Infragistics because of UlraGrid. This component is great and I am considering to buy whole package but ...

 

I have decided to use LINQ To SQL functionality instead of DataSet to use in my application to do all database management. 

I am creating right now all connections to  SQL Server using only LINQ and I am trying to avoid DataSets.

 

My question is : there is any way to use UltraGrid Designer if I have only used LINQ to SQL to bind database with UltraGrid ??

 

 

DataCl***DataContext db = new DataCl***DataContext();

 

var query = from c in db.table_example

select c;

 

ultraGrid.DataSource = query;

ultraGrid.DataBind();

 

 

UltraGrid Designer is asking me about DataSourse but I do not have any :( If not what I have to do

instead ( do I have to do everything manually ? from a code line ? ).

 

Regards

Peter

Parents
  • 17259
    Suggested Answer
    Offline posted

    Hi Peter,

    I'm using UltraGrid and Linq to Sql and it's working great together.

    In order to use the designer you need to:

    1. Build the project.

    2. Go to the grid properties and open "DataSource" drop down.

    3. Click on "Add Project Data Source..."

    4. Select "Object".

    5. Find your data class (not the data context), select it and click next.

    6. Click Finish.

    Now you have all the columns at place. You can see also that you have a BindingSource in the bottom of the designer. In runtime, get the data and set it as the bindingSource.DataSource.

     

Reply Children