Latest Development Blogs
Forum Topics Post
Browse By Tag
I enter a text like 'INTER SOFT SOLUTIONS' in grid filter bar.
But grid make it like 'INTER SOFT SOLUTIONS'.
It removes white space characters longer than 1. I think there is a trim method executed.
How can I solve this problem, I want original text.
Memo, okay, it seems I used a wrong sample to test your scenario. It's true that multiple whitespaces are removed automatically by HTML (browser) and rendered as a single whitespace.
However, you can request this feature to Intersoft by submitting this request to their product feedback in Developer Network.
This issue happen because some method couldn't be found in our assembly or CommonLibrary. Could you tell me the build version for ISNet.dll, ISNet.WebUI.dll and ISNet.WebUI.Resources.dll? Is your framework and your WebCombo assembly is the latest one? The latest Framework version is 3.0.5000.902 and the latest WebCombo version is 6.0.7200.252. Please ensure the latest framework and WebCombo assemblies has been applied in your project bin folder.
If this matter still persist, please let me know. Hope this helps.
Actually it's default behaviour in HTML, it does not recognize tab character and the reported behavior is the default WebGrid behavior> You can try to type "Intersoft Solutions" in HTML and you will see that it will be trim to "Intersoft Solutions".
Or you can use "Intersoft Solutions" and set TreatMarkupAsLiteralText="true"
Thanks first of all,
But WebGridColumn dont have "TreadMarkupAsLiteralText" property, Where can I set this property server side or client side? Can you give me example code.
Per my testing, the filter bar does take account the white space. I tried to enter "INTER SOFT SOLUTIONS" in the filter column, and then inspect the value in the server side.
Here's the result that I found:
WebGrid1.RootTable.FilteredColumns.FilterText; // Result is "INTER SOFT SOLUTIONS"
Could you confirm if you got the same result?
Hope this helps,James.
First of all thanks James,
I dont have same result. It trims.
I realize When I enter grid filter box "INTERSOFT SOLUTIONS"
and enter or click apply query filter, It trims my text like "INTERSOFT SOLUTIONS" , after that send server, so I get trimmed text :(
Memo, what Grid version do you use?
James, Enterprise 6.0
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
In WebGrid, the function of this property (TreatMarkupAsLiteralText) is to gets or sets whether markups such as HTML or XML should be treated as literal text. Therefore in WebGrid filter row's cell you couldn't put 2 or more spaces because the HTML will render it into 1 space. However, if you want to put 2 or more spaces on filter row's cell, you can put the text in HTML format such as "Text Text". That will treated as "Text Text" (2 spaces). Hope this helps.
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?
Sorry, I've put wrong format for the earlier message. To filter data with 2 or more whitespace you can use this format in filter row:
Text&[nbsp];&[nbsp];&[nbsp];Text --> this will be read as Text Text (with 3 space)(delete the [ ] symbol)
Is this method work in yours WebGrid? Probably we couldn't handle this in client side. But if you want do this with more elegant, this problematic behaviour have been stacked on our feature request. I'll let you know if I heard something from developer team regarding this problematic behaviour.
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:
//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]; ?
OnCustomFilter method invoked when AutomaticFilter feature in WebGrid is set to false and when filtering is needed on data binding process. If you doesn't set that property to false, this event won't be triggered. This problem happen because HTML behaviour that change whitespace into 1 whitespace like I said above. Probably, there's no event that triggered when we type on Filter TextBox. That's why, we couldn't handle changes of WebGrid input on filter bar.
For now the only way to do this filter is using HTML tag [and]nbsp; that will rendered as whitespace in HTML. I also attach the screenshot here. Hope that helps. But for doing this in more elegant method, maybe we should wait for the feature that we suggest inside future request to our developer team. I'll let you know if I heard anything regarding this feature request.
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?
There's official request for this problem. But we still don't know the estimated time from developer regarding this issue. If you want, I will set this request as high priority feature request. And I'll let you know if I heard something regarding this feature request. Hope this helps.
Hi Bernard,Do you have any news about the fixing of this issue?We need this fix because our customers ask us every days about this issue. RegardsArmore1927
Actually in WebGrid 8 on latest build, WebGrid has implement new property to preserve its whitespace. You can change PreserveWhitespace property on WebGridColumn to true value to resolve this issue. Please let me know if there are any new issue regarding this whitespace problem. Hope this helps.
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
[MissingMethodException: Method not found: 'Boolean ISNet.WebUI.ISNetControl.get_IsMvc()'.]
ISNet.WebUI.WebGrid.WebGrid.OnPreRender(EventArgs e) +0
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
From version history, I just found out that this fix has been added from WebGrid 8.0.7200.251. You can try to update your WebGrid via Update Manager or you can grab it from your developer network. After applying the assembly, you can try to use PreserveWhitespace property on you WebGridColumn. Please let me know if there are any new issue regarding this scenario. Look forward to hear any feedback from you so I can help you further.
Line 483: </tables>
Line 484: </isdatasource:isdatasource>
Line 485: <ISWebCombo:WebCombo ID="WebComboProd" runat="server" AdditionalSearchFields="ProductName, Speedy_CustProdRefDescription"
Line 486: DataSourceID="ISProductRefDS" DataMember="pGetproductreference" DataTextField="ProductNumber"
Line 487: DataValueField="ProductId" MinCharsToRequest="2" Height="20px" UseDefaultStyle="True"
[MissingMethodException: Method not found: 'Void ISNet.WebUI.ISDesignerBase.SetDirty()'.]
ISNet.WebUI.WebCombo.WebCombo.set_Width(Unit value) +0
ASP.orderpositionsgrid_aspx.__BuildControlWebComboProd() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:485
ASP.orderpositionsgrid_aspx.__BuildControlmain() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:125
ASP.orderpositionsgrid_aspx.__BuildControlform1() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:115
ASP.orderpositionsgrid_aspx.__BuildControlTree(orderpositionsgrid_aspx __ctrl) in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\Speedy\SpeedyPlusCrmUFX20120511\OrderPositionsGrid.aspx:1
ASP.orderpositionsgrid_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\isv_speedy_speedypluscrmufx20120511\1a5c456a\4d4ff7c2\App_Web_gb0xf8m-.4.cs:0
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +55
System.Web.UI.Page.ProcessRequest(HttpContext context) +240
ASP.orderpositionsgrid_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\isv_speedy_speedypluscrmufx20120511\1a5c456a\4d4ff7c2\App_Web_gb0xf8m-.4.cs:0
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
Discover WebUI Studio® 2012
Get Started with WebUI Studio®
WebUI Studio® Edition
For ASP.NET Development
For Silverlight Development
For WPF Development
Learn More About ClientUI