InvalidCastException |
Unable to cast object of type 'System.Windows.Style' to type 'System.Collections.Generic.IList'1[System.Windows.Style] |
WPF and C#: Problem: 1. How to Refresh Radgridview when i Insert,update and Delete Record in database anrecord. 2.when i am Insert or Update Record than in radgridview that row is selected.
i am useing sql server 2005.
i am use to set data source of radgridview like " radgridview1.ItemsSource = ds; " ==> ds is dataset.
i am beginner so if possible than tel me by code it is easy to understand.......
can u help me as early as possible ....
i give some code which i am useing for update RadGridview
con.ConnectionString = @"Data Source=(local);Initial Catalog=DigiDms;Integrated Security=True"; |
cmd1.Connection = con; |
con.Open(); |
cmd1.CommandType = CommandType.StoredProcedure; |
cmd1.CommandText = "Pro_Insurance_Master_Select"; |
da1.SelectCommand = cmd1; |
da1.Fill(ds1); |
con.Close(); |
//dataGrid.clear(); |
//dsGrid.Reset(); |
//dsGrid = dataGrid.GetData("Pro_Insurance_Master_Select"); //set datasource of gridview |
gridShowData.ItemsSource = null; // At hear i get Error |
gridShowData.ItemsSource = ds1; |
doing this ,
when i am delete or update record than folloning error generated...
Error: >> "Object reference not set to an object"
when i am doing the "gridShowData.ItemsSource = null;"
and when i am doing insert operation than this error is not generated and RadGridview also updated.....
so pls help me as early as possible.... i am beginer ........( I re-post correctly here my message that I've already posted in the scheduler-section - it was a mistake)
Hi everybody,
I upgraded today my project from Q3-2009 to Q1-2010 and I've found an error opening Windows and UserControl into the VS2008 editor: (i'm on a Windows7 64 bit)
Cannot create instance of 'GenericTheme' defined in assembly 'Microsoft.Windows.Design.Interaction, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Exception has been thrown by the target of an invocation.
In expression Blend it's OK ...
Is it a problem of the new version?
Is there a way to solve it?
thanks in advance
Michele