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

[Solved] Extremely Urgent : Radgrid cell template contents wiping off once clicked

4 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shiva
Top achievements
Rank 1
Shiva asked on 08 Dec 2010, 11:59 AM
Hi,

This is an extremely urgent request so your prompt response is much appreciated:

Problem Statement

I have a telerik Rad grid view data column and have defined a cell template. Please see below the corresponding xaml code:

<telerik:GridViewDataColumn  Header="Category" DataMemberBinding="{Binding ListCategory, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, UpdateSourceTrigger=Default}" Width="Auto">
  
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:ListBox x:Name="lstCategory" ItemsSource="{Binding ListCategory, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, UpdateSourceTrigger=Default}"  IsEnabled="True" SelectionMode="Multiple" >
                                <telerik:ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top"/>
                                    </ItemsPanelTemplate>
                                </telerik:ListBox.ItemsPanel>
  
                                <telerik:ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel DataContext="{Binding}" Orientation="Horizontal">
                                            <CheckBox Command="{Binding DataContext.SetIsRowUpdatedCommand, ElementName=lstCategory, Mode=TwoWay}" IsChecked="{Binding IsCategorySelected, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, UpdateSourceTrigger=Default}" Margin="15, 0, 0, 0"></CheckBox>
                                            <TextBlock Text="{Binding CategoryName, Mode=TwoWay}" x:Name="CatName"></TextBlock>
                                            <TextBlock Text="{Binding CategoryID, Mode=TwoWay}" Visibility="Collapsed"></TextBlock>
                                        </StackPanel>
                                    </DataTemplate>
                                </telerik:ListBox.ItemTemplate>
                            </telerik:ListBox>
  
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>


Once the screen is run, the column appears like shown in attachment screenshot_1.jpg. But as soon as I click the contents of a particluar row of this column i.e. on the textblock CatName, the row goes into edit mode and contents of the cell wipes off as shown in screenshot_2.jpg.

Can you please share your comments on this and help me figure out the root cause of the problem??

Regards,
Shiva

4 Answers, 1 is accepted

Sort by
0
Shiva
Top achievements
Rank 1
answered on 08 Dec 2010, 12:04 PM
Couldn't attach the snapshots that time....

0
Shiva
Top achievements
Rank 1
answered on 08 Dec 2010, 12:12 PM
Still no luck with the screenshots. Please let me know if anybody is interested in having the screen shots and I'll mail them to you.
0
Accepted
Vlad
Telerik team
answered on 08 Dec 2010, 12:34 PM
Hi,

 If you do not want this column in edit mode you can simply set IsReadOnly to true for this column. 

Best wishes,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Shiva
Top achievements
Rank 1
answered on 08 Dec 2010, 12:40 PM
Excellent Vlad. You rock man. That did the trick.

Thank you so very much. Much appreciated.

Cheers,
Shiva
Tags
GridView
Asked by
Shiva
Top achievements
Rank 1
Answers by
Shiva
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or