or
private
void
SearchTextBox_Search(
object
sender, RoutedEventArgs e)
{
int
foundCellCount = 0;
foreach
(
object
o
in
((QueryableCollectionView)theGrid.ItemsSource))
{
if
(o !=
null
)
{
Type rowType = o.GetType();
PropertyInfo[] props = rowType.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
foreach
(PropertyInfo pi
in
props)
{
if
(IsVisibleColumn(pi.Name))
{
object
oCellVal = pi.GetValue(o,
null
);
if
((oCellVal !=
null
) &&
((oCellVal.GetType() ==
typeof
(
int
)) ||
(oCellVal.GetType() ==
typeof
(
string
)) ||
(oCellVal.GetType() ==
typeof
(
long
))))
{
string
cellVal = oCellVal.ToString();
if
(cellVal.Contains(txtSearch.Text))
{
// Match found
foundCellCount++;
// NEED TO HIGHLIGHT THE CONTAINING CELL HERE!!!
}
}
}
}
}
}
if
(foundCellCount > 0)
{
MessageBox.Show(
string
.Format(
"Match found in {0} cells"
, foundCellCount));
}
else
{
MessageBox.Show(
"Not Found!"
);
}
}
We are using RadControls for WPF Q2 2010.
In our project we need to update the RadGridView which contains about 100 or more strokes several times in minute. We set the property “DataLoadMode” of the RadGridView to Asynchronous but updating of the GridView hinder the program to work fast and correctly.
Can you tell us the way to resolve this problem?
<
Style
TargetType
=
"telerik:RadMaskedNumericInput"
>
<
Setter
Property
=
"Margin"
Value
=
"2 2 2 2"
/>
<
Setter
Property
=
"IsClearButtonVisible"
Value
=
"False"
/>
<
Setter
Property
=
"TextMode"
Value
=
"PlainText"
/>
<
Setter
Property
=
"KeyboardNavigation.TabNavigation"
Value
=
"Local"
/>
<
Setter
Property
=
"Validation.ErrorTemplate"
>
<
Setter.Value
>
<
ControlTemplate
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Style.Triggers
>
<
Trigger
Property
=
"Validation.HasError"
Value
=
"true"
>
<
Setter
Property
=
"ToolTip"
Value
=
"{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Red"
/>
</
Trigger
>
</
Style.Triggers
>
</
Style
>