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

Data not showing for one column

3 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 11 Apr 2011, 05:57 AM
I use a dataview as my itemsource. All columns show fine except for one. This data column has values that are mixture of strings, percentages and currency.

Sample values:
N/A
10%
$50


Any ideas why this column show as blank data in the radgridview?

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 11 Apr 2011, 07:13 AM
Hello Joshua,

May you provide a bit more details about your specific settings - what is the implementation of your business object, how do you define that particular column, how do you set the ItemsSource ?

 

Regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joshua
Top achievements
Rank 1
answered on 11 Apr 2011, 07:36 AM
In my XAML I have something like this:
<telerik:RadGridView x:Name="gridView"
                     Grid.Column="0"
    ItemsSource="{Binding Path=Data}"
   SelectionUnit="Cell"
    SelectionMode="Extended">


My ViewModel has a property like this:
private DataView _data;
public DataView Data
{
    get { return _data; }
    set
    {
        if (_data != value) { _data = value; FireNotifyPropertyChanged(d => Data); }
    }
}


The DataView is populated from an SQL stored proc which returns a datatable which is then used to create a dataview. I have checked the stored proc in SQL Management Studio and the column definitely has results there. 

The radgridview is showing results for the first few columns. The only unique thing about the column that has blank data is that it has some currency, percentages and also strings. Maybe the gridview is getting confused because of that. 

EDIT:
I tried changing that column to return just strings of 'N/A'. Still same problem.

0
Joshua
Top achievements
Rank 1
answered on 11 Apr 2011, 07:41 AM
OK I found out the problem. 

My column name was called Discount/Loading in the stored proc SQL.

When I changed it to Discount_Loading, it worked.
Tags
GridView
Asked by
Joshua
Top achievements
Rank 1
Answers by
Maya
Telerik team
Joshua
Top achievements
Rank 1
Share this question
or