TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
apurva
NA
7
0
problem with DataGrid1.AllowSorting = true;
Apr 2 2004 2:18 PM
Hi, I am observing a weird thing here ! I generate my datagrid columns programatically (the columns depend on some conditions) and for that, I have to do something like this : DataGrid1.AutoGenerateColumns = false; DataGrid1.AllowSorting = true; BoundColumn col = new BoundColumn(); col.HeaderText="Date"; col.DataField="insert_date"; col.DataFormatString = "{0:d}"; col.ItemStyle.Wrap = false; col.SortExpression = "Date"; DataGrid1.Columns.Add(col); But, my sorting does not work if the line: DataGrid1.AutoGenerateColumns = false; is present. If I comment out this line of code, then the sorting works - that too for some of the columns and not all. Also, I observed that by having this line in my code, the program execution (most probably) does not even enter the DataGrid1_SortCommand(...) method ! I am lost, if someone can shed some light, it would be great. Waiting, -Apurva.
Reply
Answers (
7
)
.NET [Compact, XML] Create Empty Dataset
unable to use % in stored procedures - pls help...