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

disappearance of values!!

5 Answers 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amine
Top achievements
Rank 1
Amine asked on 26 Jun 2012, 11:19 AM
hello
i have a problem with the gridview
when i get the data from datatable to use in the grid the result is good but when i use the horizotal scroll to see a results(there are 30 column)the values disapear and the cells are empty!!
can you help me plz?
 there is a code:
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection("Data Source=.;Initial Catalog=OptimisationDataBase;Integrated Security=True");
 string str2 = "SELECT * FROM [OptimisationDataBase].[dbo].[CDRMaxCI] WHERE [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57042 OR [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57312";
                     
                    connection.Open();
                    SqlDataAdapter sqlda = new SqlDataAdapter(str2, connection);
                    sqlda.Fill(dt);
                    connection.Close();
                    this.GridViewKPI.ItemsSource = dt;

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Jun 2012, 11:22 AM
Hello,

 Please set the DefaultView of the DataTable as an ItemsSource for the GridView. Hopefully this will resolve the problem.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Amine
Top achievements
Rank 1
answered on 26 Jun 2012, 11:26 AM
hello and thanks for fast reply
i do this
this.GridViewKPI.ItemsSource =  dt.DefaultView
but the problem persist :(
not that the problem is only for 1 or 2 rows,when i have a few rows its good
thx
0
Dimitrina
Telerik team
answered on 26 Jun 2012, 01:37 PM
Hello,

 May I ask you how have you defined your GridView? Have you implemented any additional logic using the visual elements - GridViewCell or GridViewRow?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Amine
Top achievements
Rank 1
answered on 26 Jun 2012, 01:55 PM
i have the gridview defined  in xaml,no GridViewCell or GridViewRow used
xaml:
<telerik:RadGridView Margin="0,173,300,30" Name="GridViewKPI"/>
i join a screenshot  see the problem
thx
0
Dimitrina
Telerik team
answered on 27 Jun 2012, 09:04 AM
Hi,

 So far we do not have such a problem reported with the latest version. May I ask you to isolate the problem in a demo project and send it to us? 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Amine
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Amine
Top achievements
Rank 1
Share this question
or