473,379 Members | 1,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Event/CutulreInfo/Sorting problem. Only for pros

We have come across a situation that I thinks not many have.

Grateful for all responses.

Regards Maran

*************

* Scenario
A DataList binds to a DataRow[], with "RegionName" och "RegionShortName",
sorted on "RegionName".

When the user saves changes, the controls in each DataListItem in the
DataList is fetched by FindControl and the text from "Region Name" is saved.

* Problem
When there is values in "RegionName" containing "w " och "v " (those letters
and a space), in the same postion and the rows after each other, the other
column, "RegionShortName", is sorted incorrectly for those rows.

"RegionName" is correkt in both cases, but their "RegionShortName", which
contains "w " or "v ", have been shifted.

The data is bound/shown correctly for both CultureInfo when displaying the
datalist, it is only when looping the controls the error shows.

**** Sample ****
Correct after LoadViewState (in a PostBack)
Row, Region Name (TextBox), Region Short Name (Label)
34, HJKL, New Mexico
35 NY, Nev York (Misspelled on purpose)
36, NV, Nevada

Incorrect in Save_OnClick (in a PostBack)
Row, Region Name (TextBox), Region Short Name (Label)
34, NY, New Mexico
35 NV, Nev York (Felstavat med flit)
36, HJKL, Nevada

* So far
- The problem depends on users choice of CultureInfo. The users using
English settings have no problem, those who have Swedish settings have this
problem.
- "View source" shows that the controls are rendered correctly.
- In Postback, when saving, the controls are populated in LoadViewState with
data from ViewState and DataBind() on the DataList. Here are the DataLsit's
control tree correct.
- After LoadViewState the save button event is run and when before anything
is done the DataList's control tree is incorrect
- The problem does not occur if we change "RegionShortName"'s Label to a
TextBox. This makes me think it has something to do with posted object, since
Labels are not included there.
- We have tested to override several events and examined the DataList's
control tree, but nothing found.

* Other
- The DataList is not using ViewState. LoadViewState populates the DataList,
which is checked and ok.
- There is no other sorting than when creating the DataRow[].
- In Global.asax we set the users CultureInfo with
Thread.CurrentThread.CurrentCulture = new CultureInfo(...) in
Application_AuthenticateRequest.
- We have fixed the problem temporarily by changing the Label to a disabled
TextBox.
Apr 21 '06 #1
0 1117

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Xah Lee | last post by:
Sort a List Xah Lee, 200510 In this page, we show how to sort a list in Python & Perl and also discuss some math of sort. To sort a list in Python, use the “sort” method. For example: ...
1
by: Lisa | last post by:
I have a web app that gets a recordset from the database and fills a grid. You can drilldown from this table to a detail table. Because the tables sometimes get huge, and because I have to go...
2
by: Arjen | last post by:
Hi, I get this error message when sorting a gridview: The GridView 'GridView1' fired event Sorting which wasn't handled What do I need to do? Thanks!
27
by: Codemonkey | last post by:
Heya All, Sorry, but I think it's about time for a monkey-ramble. I've just had enough of trying to serialize even simple objects with VB. A simple task you may think - stick the...
2
by: shuckjunkmail | last post by:
It was suggested that I re-submit this question as a new post rather than adding onto an old and unanswered post. The basic problem has to do with the .NET datagrid and sorting. I am having...
1
by: Mark Gilkes | last post by:
I have a DataGrid which I am adding to the page dynamically at the Init stage of the page load. The DataGrid has AutoGenerateColumns turned off, has BoundColumns and is bound to a DataView for...
1
by: Annie | last post by:
Hello guys, We are planning for a big project ... and in the warming up stages ... we are trying to develop the applicaiton in n-tier. One of the option is to use the ASP.net object...
2
by: =?Utf-8?B?ZmFpcnl2b2ljZQ==?= | last post by:
in a remoting application, i set a event in the host, and let the client to book it, and in the host side i set the TypeFilterLevel to Full and open the callback port in the client side, but told...
7
Plater
by: Plater | last post by:
I am having trouble determining when my DataGridView object is sorting (based on a column header click). The idea is, in a large table, sorting the columns takes time, so I show a splash screen....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.