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

Multiselect not working

3 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bhavin
Top achievements
Rank 1
Bhavin asked on 31 Oct 2009, 04:47 AM
I have IList<Vehicle_Data> where
Vehicle_Data has property:      keyvehicletype,owned,VEHICLE_TYPES
where VEHICLE_TYPES has property:   keyvehicletype,DESCRIPTION,POWER_UNIT,TOTAL

there is mapping between vehicle_data,vehicle_types.

Grid doesn't allow me to multiselect rows.please reply ASAP

    <telerik:RadGridView  MultipleSelect="True"   LostFocus="RadGridView1_LostFocus"   Name="RadGridView1"  Height="150"   ScrollViewer.HorizontalScrollBarVisibility="Hidden"   ScrollViewer.VerticalScrollBarVisibility="Auto"   VerticalAlignment="Stretch"  ShowGroupPanel="False" ShowGroupFooters="False"   ColumnsWidthMode="Fill" ShowColumnFooters="True"  HorizontalAlignment="Stretch" IsFilteringAllowed="False"   RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"  telerik:StyleManager.Theme="Office_Black" CanUserFreezeColumns="False" AreRowDetailsFrozen="False"  CellEditEnded="RadGridView1_CellEditEnded"     >
                          
                            <telerik:RadGridView.Resources>
                                <Style TargetType ="{x:Type telerik:GridViewHeaderCell}">
                                    <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
                                </Style>
                                <Style TargetType="telerik:GridViewCell">
                                    <EventSetter Event="MouseUp" Handler="Cell_MouseUP"/>
                                    
                                </Style></<telerik:RadGridView.Resources>

                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn x:Name="dcVehicletype" Header="Vehicle Type" ToolTip="Vehicle Type" IsReadOnly="True" HeaderTextAlignment="Center" TextWrapping="Wrap"   DataMemberBinding="{Binding Path=VEHICLE_TYPES.DESCRIPTION}"     />

                                <telerik:GridViewDataColumn Header="Power Unit" ToolTip="Power Unit" IsReadOnly="True" HeaderTextAlignment="Center"  >
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.POWER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Passenger Unit" ToolTip="Passenger Unit" IsReadOnly="True" HeaderTextAlignment="Center">
                                    <telerik:GridViewColumn.CellTemplate >
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.PASSENGER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="HM Capable" HeaderTextAlignment="Center" IsReadOnly="True" ToolTip="HM Capable">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.HM_CAPABLE,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Total"   TextAlignment="Center"  IsReadOnly="True" IsEnabled="False"   DataMemberBinding="{Binding x:null}"  HeaderTextAlignment="Center" >
                                    <telerik:GridViewColumn.CellTemplate  >
                                        <DataTemplate>
                                            <TextBlock Foreground="Gray" IsEnabled="False"  HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding VEHICLE_TYPES.TOTAL}" >
                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>


                                <telerik:GridViewDataColumn   Header="Owned" TextAlignment="Center"  ToolTip="Owned" IsReadOnly="True"   HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}"  >
                                  
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii"  Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtOwned_TextChanged"   x:Name="TxtOwned" Margin="5,0" Text="{Binding OWNED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>

                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Owned: "  SourceField="OWNED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>

                                <telerik:GridViewDataColumn Header="Term Leased"   ToolTip="Term Leased" HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                   
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center"  Tag="{Binding}"  VerticalAlignment="Top" Width="40"  TextChanged="TxtTermLeased_TextChanged"   x:Name="TxtTermLeased" Margin="5,0" Text="{Binding TERM_LEASED}" >

                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Term Leased: "  SourceField="TERM_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn  Header="Trip Leased" TextAlignment="Center" ToolTip="Trip Leased" HeaderTextAlignment="Center"  DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                  
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtTripLeased_TextChanged"   x:Name="TxtTripLeased"  Margin="5,0" Text="{Binding TRIP_LEASED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Trip Leased: "  SourceField="TRIP_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
private void Cell_MouseUP(object sender, MouseEventArgs args)
        {
            try
            {
          
                foreach (DataRecord rec in this.RadGridView1.Records)
                {
                   // DriverVehicle_Data d = (DriverVehicle_Data)rec.Data;
                    //d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);
                     VEHICLE_DATA r = (VEHICLE_DATA)rec.Data;
                     VEHICLE_TYPES type = (VEHICLE_TYPES)r.VEHICLE_TYPES;
                     type.TOTAL = Convert.ToInt32(r.OWNED + r.TERM_LEASED + r.TRIP_LEASED);
                }

                RadGridView1.CalculateAggregates();
                RadGridView1.CommitEdit();
                RadGridView1.MultipleSelect = true;
            }
            catch (Exception ex)
            {
                throw;
            }

        }

 

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 31 Oct 2009, 11:52 AM
Hi bhavin patel,

We were unable to reproduce the problem that you have described. Could you send us a sample application that will allow us to reproduce the problem?


Sincerely yours,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bhavin
Top achievements
Rank 1
answered on 02 Nov 2009, 01:16 AM
I didn't find any option to attach the txt file type:so I am here pasting the content....sorry for that.But i need to get it done urgently.I have put xaml code,cs code,domain oject and valueconverter.If you further need any thing which you think I missed let me know.


Xaml Code:

    <telerik:RadGridView ScrollMode="RealTime"   LostFocus="RadGridView1_LostFocus"   Name="RadGridView1"  Height="150" MultipleSelect="True"   ScrollViewer.HorizontalScrollBarVisibility="Hidden"   ScrollViewer.VerticalScrollBarVisibility="Auto"   VerticalAlignment="Stretch"  ShowGroupPanel="False" ShowGroupFooters="False"   ColumnsWidthMode="Fill" ShowColumnFooters="True"  HorizontalAlignment="Stretch" IsFilteringAllowed="False"   RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"  telerik:StyleManager.Theme="Office_Black" CanUserFreezeColumns="False" AreRowDetailsFrozen="False"  CellEditEnded="RadGridView1_CellEditEnded"     >
                        <telerik:RadGridView.Resources>
                                <Style TargetType ="{x:Type telerik:GridViewHeaderCell}">
                                    <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
                                </Style>  <Style TargetType="telerik:GridViewCell"> <EventSetter Event="MouseUp" Handler="Cell_MouseUP"/>
                                </Style>
                                </telerik:RadGridView.Resources>
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn x:Name="dcVehicletype" Header="Vehicle Type" ToolTip="Vehicle Type" IsReadOnly="True" HeaderTextAlignment="Center" TextWrapping="Wrap"   DataMemberBinding="{Binding Path=DESCRIPTION}"     />
                               <telerik:GridViewDataColumn Header="Power Unit" ToolTip="Power Unit" IsReadOnly="True" HeaderTextAlignment="Center"  >
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=POWER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Passenger Unit" ToolTip="Passenger Unit" IsReadOnly="True" HeaderTextAlignment="Center">
                                    <telerik:GridViewColumn.CellTemplate >
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=PASSENGER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="HM Capable" HeaderTextAlignment="Center" IsReadOnly="True" ToolTip="HM Capable">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=HM_CAPABLE,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Total"   TextAlignment="Center"  IsReadOnly="True" IsEnabled="False"   DataMemberBinding="{Binding x:null}"  HeaderTextAlignment="Center" >
                                    <telerik:GridViewColumn.CellTemplate  >
                                        <DataTemplate>
                                            <TextBlock Foreground="Gray" IsEnabled="False"  HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding TOTAL}" >
                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                               <telerik:GridViewDataColumn   Header="Owned" TextAlignment="Center"  ToolTip="Owned" IsReadOnly="True"   HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}"  >
                                         <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii"  Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtOwned_TextChanged"   x:Name="TxtOwned" Margin="5,0" Text="{Binding OWNED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                  <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Owned: "  SourceField="OWNED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                               <telerik:GridViewDataColumn Header="Term Leased"   ToolTip="Term Leased" HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center"  Tag="{Binding}"  VerticalAlignment="Top" Width="40"  TextChanged="TxtTermLeased_TextChanged"   x:Name="TxtTermLeased" Margin="5,0" Text="{Binding TERM_LEASED}" >
                                           </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Term Leased: "  SourceField="TERM_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn  Header="Trip Leased" TextAlignment="Center" ToolTip="Trip Leased" HeaderTextAlignment="Center"  DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                               <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtTripLeased_TextChanged"   x:Name="TxtTripLeased"  Margin="5,0" Text="{Binding TRIP_LEASED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Trip Leased: "  SourceField="TRIP_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                           </telerik:RadGridView.Columns>
                       </telerik:RadGridView>

Cs code:

private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {  SetDriverVehicleData(list)();}

 private void SetDriverVehicleData(IList<VEHICLE_DATA> list)
        {    try
            {   IList<DriverVehicle_Data> datalist = new List<DriverVehicle_Data>();
                foreach (VEHICLE_DATA d in list)
                {    DriverVehicle_Data data = new DriverVehicle_Data();
                    data.KEY_VEHICLE_TYPE = d.KEY_VEHICLE_TYPE;
                    data.REVKEY = d.REVKEY;
                    data.OWNED = d.OWNED;
                    data.TERM_LEASED = d.TERM_LEASED;
                    data.TRIP_LEASED = d.TRIP_LEASED;
                    data.IsChecked = d.IsChecked;
                    data.DESCRIPTION = d.VEHICLE_TYPES.DESCRIPTION;
                    data.HM_CAPABLE = d.VEHICLE_TYPES.HM_CAPABLE;
                    data.PASSENGER_UNIT = d.VEHICLE_TYPES.PASSENGER_UNIT;
                    data.POWER_UNIT = d.VEHICLE_TYPES.POWER_UNIT;
                    data.TOTAL = d.VEHICLE_TYPES.TOTAL;
                    datalist.Add(data);
                }
                RadGridView1.Records.Clear();
                RadGridView1.ItemsSource = datalist;
                RadGridView1.Rebind();
            }
            catch (Exception ex)
            {   throw;   }
}
  private void TxtOwned_TextChanged(object sender, TextChangedEventArgs e)
        {   try
            {
                GridViewCell cell = ((TextBox)sender).Parent as GridViewCell;
                GridViewRow row = (GridViewRow)cell.ParentRow;
                TextBox txt = (TextBox)sender;
                DriverVehicle_Data d = (DriverVehicle_Data)cell.DataContext;
                d.OWNED = ParseInt(txt.Text);
                d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);
                 GridViewCellBase cTotal = row.Cells[4];
                TextBlock tb = cTotal.Content as TextBlock;
                tb.Text = d.TOTAL.ToString();
                 CalculateAggregates();
                _Driver_VehicleDAL.SaveVehicleData(d, d.KEY_VEHICLE_TYPE, d.REVKEY, "OWNED", d.OWNED);
            }
            catch (Exception ex)
            {  throw; }
       }
  private void TxtTermLeased_TextChanged(object sender, TextChangedEventArgs e)
        {   try
            {    GridViewCell cell = ((TextBox)sender).Parent as GridViewCell;
                GridViewRow row = (GridViewRow)cell.ParentRow;
                TextBox txt = (TextBox)sender;
                DriverVehicle_Data d = (DriverVehicle_Data)cell.DataContext;
                d.TERM_LEASED = ParseInt(txt.Text);
                d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);
                  GridViewCellBase cTotal = row.Cells[4];
                TextBlock tb = cTotal.Content as TextBlock;
                tb.Text = d.TOTAL.ToString();
                 CalculateAggregates();
                _Driver_VehicleDAL.SaveVehicleData(d, d.KEY_VEHICLE_TYPE, d.REVKEY, "TERM_LEASED", d.TERM_LEASED);
            }
            catch (Exception ex)
            {   throw;   }
        }
       private void TxtTripLeased_TextChanged(object sender, TextChangedEventArgs e)
        {    try
            {    GridViewCell cell = ((TextBox)sender).Parent as GridViewCell;
                GridViewRow row = (GridViewRow)cell.ParentRow;
                TextBox txt = (TextBox)sender;
                DriverVehicle_Data d = (DriverVehicle_Data)cell.DataContext;
                d.TRIP_LEASED = ParseInt(txt.Text);
                d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);
                GridViewCellBase cTotal = row.Cells[4];
                TextBlock tb = cTotal.Content as TextBlock;
                tb.Text = d.TOTAL.ToString();
                 CalculateAggregates();
                _Driver_VehicleDAL.SaveVehicleData(d, d.KEY_VEHICLE_TYPE, d.REVKEY, "TRIP_LEASED", d.TRIP_LEASED);
            }
            catch (Exception ex)
            {  throw;  }
        }

 private void CalculateAggregates()
        {   try
            {   foreach (DataRecord rec in this.RadGridView1.Records)
                {  DriverVehicle_Data d = (DriverVehicle_Data)rec.Data;
                    d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);   }
                this.RadGridView1.CalculateAggregates();
                this.RadGridView1.CommitEdit();
                this.RadGridView1.MultipleSelect = true;
               }
               catch (Exception ex)
            {       throw;  }
        } 
 private void Cell_MouseUP(object sender, MouseEventArgs args)
        {   try
            {  foreach (DataRecord rec in this.RadGridView1.Records)
                {     DriverVehicle_Data d = (DriverVehicle_Data)rec.Data;
                    d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);   }
               RadGridView1.CalculateAggregates();
                RadGridView1.CommitEdit();
                RadGridView1.MultipleSelect = true;
            }
            catch (Exception ex)
            {  throw; }
       }
 private void RadGridView1_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
        {      object editedRecord = this.RadGridView1.CurrentItem;
            VEHICLE_DATA r = (VEHICLE_DATA)((DataRecord)(this.RadGridView1.CurrentRecord)).Data;  }}
private void RadGridView1_LostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
        {   try
            {  object editedRecord = this.RadGridView1.CurrentItem;
                VEHICLE_DATA r = (VEHICLE_DATA)((DataRecord)(this.RadGridView1.CurrentRecord)).Data;
                 this.RadGridView1.Rebind();
                RadGridView1.CalculateAggregates();
               }
            catch (Exception ex)
            {   throw;  }  }
}
Classes
 public class VEHICLE_DATA {
        public virtual int KEY_VEHICLE_TYPE { get; set; }
        public virtual double OWNED { get; set; }
        public virtual string REVKEY { get; set; }
        public virtual double TERM_LEASED { get; set; }
        public virtual double TRIP_LEASED { get; set; }
        public bool IsChecked { get; set; }
        public VEHICLE_DATA() {
        }
        public VEHICLE_TYPES VEHICLE_TYPES
        {   get;
            set;
        }
}
  public class VEHICLE_TYPES {
        public virtual string DESCRIPTION { get; set; }
        public virtual string HM_CAPABLE { get; set; }
        public virtual int KEY_VEHICLE_TYPE { get; set; }
        public virtual string PASSENGER_UNIT { get; set; }
        public virtual string POWER_UNIT { get; set; }
        public bool IsChecked { get; set; }
        public int TOTAL { get; set; }
        public VEHICLE_TYPES() {   }
    }

ValueConverter
  [ValueConversion(typeof(bool), typeof(string))]
    public class BoolConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter,
        CultureInfo culture)
        {
            bool Ischecked = false;
            if (string.Compare(value.ToString(), "T", false) == 0) { Ischecked = true; }
            return Ischecked;
        }
        public object ConvertBack(object value, Type targetType, object parameter,
        CultureInfo culture)
        {
            string Ischecked = value.ToString();
            bool result;

            if (bool.TryParse(Ischecked, out result))
            {
                return result;
            }
            return value;
        }
    }

0
Milan
Telerik team
answered on 04 Nov 2009, 02:26 PM
Hi bhavin patel,

I managed to compile a project that resembles the original one (although some information like the DriverVehicle_Data class was missing) and it seems that the multiple selection is working. Keep in my that if you click on controls that handle mouse and keyboard events (like the MaskedTextBox) their hosting row will not be selected.

May I ask you how are you trying to select multiple items? With this version of RadGridView multiple items can be selected by holding down the CTRL or the SHIFT keys.

I have also attached the sample project that I used.


Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Bhavin
Top achievements
Rank 1
Answers by
Milan
Telerik team
Bhavin
Top achievements
Rank 1
Share this question
or