iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
We have a grid that started crashing, after the last grid update to the latest patches/fixes, which was wroking fine prior. When we sort that column, an exception occurs.
We narrowed it down to the WebGridRequest during the FlyPostBack. Whenever we use the word "Online" in the column name, the "On" gets replaced by the \x02 character.
<WebGrid><request id="ctl00_ctl00_ctl00_Content_View_View_PrismVirtualGridViewAirports" action="ColumnSort" columnName="isAirport^line" tblName=""/></WebGrid>
The request above is an example where the column being sorted has "isAirportOnline" as the column name.
Note that in order to submit this post, I had to change the above request to remove the special characters that are normally in the post back. Otherwise posting this thread would fail. So I've changed what normally is the \x03 character to '<' and '^' for \x02.
By the way, why is the '<' character, in the post request, not itself but \x03?
[EDIT] I wanted to add that this is a boolean column.
We did a few more tests and it looks like the column type has no impact. It's specific to the string "On" only. We tried "on" and no problem. We also tried variations of "Off" in case something was attempting to work on on/off states of some kind and no issues. So only when "On" is in the column name does it get mucked up.
I created a simple sample of WebGrid based on the information provided in the first post of this thread. I have WebGrid bind to a table that has two columns. The first column is the “ID” column – has nchar(10) data type; and the other column is the “OnLine” column – has bit data type.
The dummy data filled into the table is shown as follow.
ID
OnLine
Row0
True
Row1
False
Row2
Row3
Row4
Row5
Row6
Row7
The grid is then bound to the above table. The snippet code below shows the column structure and the LayoutSettings where AllowSorting is enabled.
<LayoutSettings AllowSorting="Yes"> </LayoutSettings> <RootTable DataKeyField="ID"> <Columns> <ISWebGrid:WebGridColumn Caption="ID" DataMember="ID" Name="ID" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="OnLine" DataMember="OnLine" Name="OnLine" Width="100px" DataType="System.Boolean"> </ISWebGrid:WebGridColumn> </Columns> </RootTable>
Everything worked smoothly when the “OnLine” column is sorted (both ascendant and descendant). I’m afraid that I might miss something during my attempt in order to reproduce the issue on my local end.
Please let us hear your feedback regarding this issue.
Okay, try using a template column. That's what we use for all our Boolean columns. The column loads either nothing for false or an image of a check mark when true. I'd be curious to see if the template is causing this. Thank you.
Per your suggestion, I have re-test the issue by using a template column and find no problem when try to do sorting over the “OnLine” column.
Please kindly let us know if you have any other things that we need to check.
How are you populating the grid? Rather than "hard code" the column configuration, create the columns dynamically, e.g., Grid.RootTable.Columns.Add and so on, from a data set and also load the data from a data table.
We configure our grids dynamically and load our data from the database.
Can you please have your developers check the grid javascript for "\x02" and see if they do any replace on literals like "On" anywhere? We do not use this hex character anywhere in our code so we're not infusing this in the post back so it has to be coming from WebGrid. Your process is obviously what puts together the WebGridRequest request XML, so it has to be happening under the conditions we have which you are not able to reproduce right now. Thanks Yudi.
[EDIT] Yudi, I wanted to ask. Are you checking the post back data to make sure the data is not messed up as I reported? When you sort the column, are you debugging into the code and checking the content of Page.Request["WebGridRequest"] and it looks fine? Also, would you find an answer to my original question above, "By the way, why is the '<' character, in the post request, not itself but \x03?"
I have checked the post back data and find that when the column name contains “On” the POST Data change it to WebGridRequest= WebGrid> request id="WebGrid2" action="ColumnSort" columnName="[1]Line" tblName=""/> /WebGrid>.
WebGrid> request id="WebGrid2" action="ColumnSort" columnName="[1]Line" tblName=""/> /WebGrid>.
request id="WebGrid2" action="ColumnSort" columnName="[1]Line" tblName=""/> /WebGrid>.
/WebGrid>.
I have forwarded this to WebGrid development team for further investigation.
During my attempt to reproduce your issue on my local end, I found out that when I change the value of ColumnName property from “OnLine” to “onLine”, the POST Data is not messed up.
Is it possible to use this (changing ColumnName property from “OnLine” to “onLine”) as work around in your scenario?
Hi Yudi,
Actually our column name is isOnLine so it doesn't matter that the "On" starts the name of is in the middle of it. For now we're using this workaround since changing the column names is not really convenient as it impacts other tables and stored procedures and triggers and so on.
if (strRequest.Contains("\x02")) { strRequest = strRequest.Replace("\x02","On"); }
This is now the THIRD time I'm having to ask this question as already asked above:
Also, would you find an answer to my original question above, "By the way, why is the '<' character, in the post request, not itself but \x03?"
Would you kindly answer the question?
I’m sorry for the late respond.
WebGrid development team has confirmed that this issue is a bug. I have submitted this bug and filed it under work item #938. The team suspects that the internal operation may have caused the ‘<’ character in the POST request replaced with the ‘\x03’.
I’ll keep you updated with any news I heard from the team regarding work item #938.
Thanks Yudi. I appreciate you finding out as it's important for us to know because we do a lot of custom work to fit the grid to our needs which includes parsing the web request. So now I can modify my code in anticipation for this fix.
Yes, Yousif.
I will let you know when the nightly-build hotfix is ready. We’d like to let you test the nightly-build of the hotfix so that we can hear your feedback regarding this issue.
Thank you and have a nice day.
Has this been fixed in 2011 R1?
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname