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

Radgrid red border when editing

4 Answers 369 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jeremie
Top achievements
Rank 1
Jeremie asked on 09 Aug 2010, 04:06 PM
Hi ,

I did some test on the grid view and i have an unexpected behaviour.
What is the meaning of a red border when a cell is edited ? (you can see the example on the attached screenshot. )

My problem is that I can't edit one column (the column "6" on the screenshot). The red border appears if i try to put a value. Only this column doesn't work as expected, others can be edited. I spend some time on this problem, i didn't found any solution.

<telerik:RadGridView Name="radgrid" Margin="2,2,2,2" IsScrolling="True" ScrollMode="Deferred" DataLoadMode="Synchronous"
         ItemsSource="{Binding .Value,                      UpdateSourceTrigger=PropertyChanged}"                                    
         EnableColumnVirtualization="True" EnableRowVirtualization="True" MaxHeight="500" MaxWidth="700"
         FrozenColumnCount="1" IsFilteringAllowed="False" ShowGroupPanel="False" RowDetailsVisibilityMode="Collapsed"
         AutoGeneratingColumn="AutoGeneratingColumnEvent" telerik:StyleManager.Theme="Summer" EditTriggers="CellClick" >
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn  IsReadOnly="True" DataMemberBinding="{Binding RowHeader}" CellStyle="{StaticResource RowHeaderStyle}" Header=""/>         
    </telerik:RadGridView.Columns>     
</telerik:RadGridView>

Best regards, 
Jeremie GAMBIN

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Aug 2010, 04:41 PM
Hi Jeremie,

 This actually is our validation - most probably you have exception in the property setter. 

Greetings,
Vlad
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
Jeremie
Top achievements
Rank 1
answered on 11 Aug 2010, 10:50 AM
hi, 
thanks for that quick answer.

I'm using the trial version of WPF Q1 2010 SP2.
The red border in the demo is a little different, the upper right corner is a red triangle. Which is different in my case, that's why i had doubt on the validation issue.

My binding is done on a DataTable and there is no validation property.

this.MatrixTable = new DataTable();
           //create colums
           MatrixTable.Columns.Add(new DataColumn("RowHeader", typeof(string)));
           MatrixTable.Columns.Add(new DataColumn("1", typeof(string)));
           MatrixTable.Columns.Add(new DataColumn("3", typeof(string)));
 
           var row1 = MatrixTable.NewRow();
           MatrixTable.Rows.Add(row1);
           row1["RowHeader"] = "1";
           row1["1"] = "X";
           row1["3"] = "";
 
           var row2 = MatrixTable.NewRow();
           MatrixTable.Rows.Add(row2);
           row2["RowHeader"] = "3";
           row2["1"] = "b";
           row2["3"] = "X";
 
           return MatrixTable;

The red border appears when i try to valid the cell. if i add 
            MatrixTable.ColumnChanged += ColumnChanged;
            MatrixTable.ColumnChanging += ColumnChanging;
both method are not reached when i edit and valid my cell

If i do the same, with rows "Header" "1" and "2" (consecutiv integers), the edition works as expected in every columns.
If i do the same, with rows "Header" "A" and "B" (consecutiv char), the edition works as expected in every columns. 
If i do the same, with rows "Header" "A" and "C" (not consecutiv char), the edition works as expected in every columns. 

I think the problem comes from columns headers with values which are integers. (Strings with "integer value"). Is that a bug ?


          
0
Jeremie
Top achievements
Rank 1
answered on 11 Aug 2010, 11:00 AM
You can also see on the screenshot that the white rectangle of the scrollbar "details" appears even if there is no scrollbar. And I have no solution to hide it.
Even if there is a scrollbar, the same white rectangle appears on datagrid load. I have to move the scrollbar in order to hide this rectangle. 

Is there something in my XAML code which is  wrong ?
0
Nedyalko Nikolov
Telerik team
answered on 13 Aug 2010, 08:19 AM
Hello Jeremie,

Could you please send me a sample project that demonstrates this, since I cannot figure out why do you receive red border?

Regards,
Nedyalko Nikolov
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
Tags
GridView
Asked by
Jeremie
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jeremie
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or