<telerik:RadListBox Name=
"testlv"
>
<telerik:RadListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush=
"Turquoise"
BorderThickness=
"0,1,0,1"
Width=
"{Binding Path=ActualWidth, ElementName=grdzero}"
>
<WrapPanel Orientation=
"Vertical"
>
<TextBlock Foreground=
"Black"
Text=
"{Binding nazwa}"
FontSize=
"16"
></TextBlock>
<WrapPanel Orientation=
"Horizontal"
>
<TextBlock Foreground=
"Black"
Text=
"Cena: "
FontSize=
"16"
></TextBlock>
<TextBlock Foreground=
"Black"
Text=
"{Binding cena}"
FontSize=
"16"
></TextBlock>
</WrapPanel>
<WrapPanel Orientation=
"Horizontal"
>
<TextBlock Foreground=
"Black"
Text=
"Kod: "
FontSize=
"16"
></TextBlock>
<TextBlock Foreground=
"Black"
Text=
"{Binding kod}"
FontSize=
"16"
></TextBlock>
</WrapPanel>
</WrapPanel>
</Border>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
</telerik:RadListBox>
And code behind:
private
void
getProducts(
string
query)
{
prodDG.Items.Clear();
List<SearchProd> pL = FastSellSearchClass.lista.Where(x => x.nazwa.ToLower().Contains(query.ToLower()) || x.kod.Contains(query) && x.wID ==
int
.Parse(Application.Current.Properties[
"warehouseID"
].ToString())).ToList();
testlv.ItemsSource = pL;
}
List<searchProd> represent list of product. It work's like:
client press any key in keyboard, which open new window with radListBox, insert pressed key into textBox, and going into
getProducts(string query) to filter items (where query = pressed key).
So for example when somebody press 'S', it will search for items, where name or code contains 'S'.
Problem is that, with 3000 products page is loading for like 9-10 second.
When it's loaded, it tooks less than second to find any words with 'Sa' for example.
So is there any way to speed up opening window a little bit?
Hi,
I am looking at implementing a automatic mindmap diagram layout in order to enforce the position of the items dropped as well as update the layout whenever a branch is expanded or collapsed. The basic behavior I am looking for is similar to the one provided as a sample with the mindmap layout sample. One of the tricky part is to update the existing item's position when the user expands a node in order to avoid items overlap. Do you recommand a particular approach in this area. XMind does a pretty good job in this area and this is the kind of behavior I am trying to implement.
Rgds
Robert
Hello.
I have a problem with columns in grid. I would like to have columns with the same width and this width should not depend on the content of the columns.
Here is my code:
<Grid Margin="5" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<telerik:RadTreeView Margin="5,0,5,0" Grid.Column="0"
ItemsSource="{Binding TreeView0}" />
<telerik:RadTreeView Margin="5,0,5,0" Grid.Column="1"
ItemsSource="{Binding TreeView1}" />
<telerik:RadTreeView Margin="5,0,5,0" Grid.Column="2"
ItemsSource="{Binding TreeView2}" />
<telerik:RadTreeView Margin="5,0,5,0" Grid.Column="3"
ItemsSource="{Binding TreeView3}" />
</Grid>
When I am expanding tree in RadTreeView the column changes it's width and other columns changes respectively. But I would like to have four columns with width = 1/4 of grid's width. RadTreeView has its own ScrollBar for horizontal scrolling.
Is there any property on RadTreeView that stops it from growing horizontally? I tried to enable horizontal scrollbar but it didn't helped.