User Profile & Activity

Alessandro Silvestri Member

Hallo Bernard,

 

thanks for the explanation and the example. Unfortunately I think that our customer would not like such a workaround.

Is there any official request for this problem?

If yes when its resolution is planned?

 

 

best regards

Alessandro

Hi Bernard,

 

thanks for your reply but it's not very clear for me how to format the filter row.

Could you please provide me some sample code?

I was trying to replace the white spaces on the filter row with &[nbsp]; within a client side event, but until now I was not able to do it. I was looking at the OnColumnFilter event but I don't know exactly how it works.

Here my web grid definition:

<ISWebGrid:WebGrid ID="WebGridPrices" runat="server" Width="100%"

                           UseDefaultStyle="True" BindingOperationMode="ClientBinding"

                           DefaultStyleMode="Elegant" StateRestorationLevel="Low" >

            <LayoutSettings  AutoFitColumns="true" AllowColumnMove="Yes" AllowGrouping="Yes" GroupByBoxVisible="True" GroupRowInfoFormatDefault="[caption] : [value] ([count])"

                    AllowContextMenu="True" AllowFilter="Yes" FilterBarVisible="true"

                    AllowSorting="Yes" AlwaysShowHelpButton="False"

                    HideColumnsWhenGrouped="No" ColumnFooters="Yes"  AllowExport="Yes"

                    AutoFilterSuggestion="True" ShowColumnAction="True"

                    ShowRefreshButton="False" AutoHeight="true" PagingMode="VirtualLoad" VirtualPageSize="30">

                <ClientSideEvents OnInitializeRow="WebGridPrices_OnInitializeRow"

                OnAfterInitialize="WebGridX_OnAfterInitialize"

                OnColumnFilter="WebGridPrices_OnColumnFilter"

                />

<RootTable Caption="Price info" >

                 <Columns>

                    <ISWebGrid:WebGridColumn Caption="ProductNumber" DataMember="productNumber"

                            Name="productNumber" Width="100px" TreatMarkupAsLiteralText="True">

                    </ISWebGrid:WebGridColumn>

...

 

Then I define a function like:

 function WebGridPrices_OnColumnFilter(sender,args){

//here I make the replacement of white spaces

}

 

But this doesn't work the client side event OnColumnFilter seems not to be triggered.

What should I do exactly to replace the white spaces on the filter row with &[nbsp]; ?

 

 

thanks in advance

Alessandro

 

 

Hi Bernard,

the problem is that we don't know how many white space could be present.

For example product codes could be:

"0800 100 100"  (one white space)

"0160 301  16"  (two white spaces)

"0039    3 101 (three white spaces)

 

The problem is that, in case the number of consecutive white spaces is greater then one, they are automatically reduce to 1, and the filter doesn't work as expected.

Is there a way to avoid this problem (maybe by handling a client side event)?

Should we open a case for that?

 

regards

Alessandro

 

 

 

Hello,

 

I have the same problem.

We store data regarding product codes, which could have more whitespaces inside

Example: "0890  12    4"

If this string is put in the filter, then the grid makes automatically "0890 12 4" and the products are non correctly filtered as expected.

In the WebGridColumn the property TreatMarkupAsLiteralText="True" is set.

 

Is there a way to make the filter without the trim of the whitespaces?

 

thanks in advance

Alessandro 

 

All times are GMT -5. The time now is 2:19 AM.
Previous Next