Click here to Skip to main content
15,916,463 members
Home / Discussions / C#
   

C#

 
QuestionGet an "index" for a field of a class? Pin
blackblizzard18-Feb-10 23:29
blackblizzard18-Feb-10 23:29 
AnswerRe: Get an "index" for a field of a class? Pin
Luc Pattyn19-Feb-10 0:21
sitebuilderLuc Pattyn19-Feb-10 0:21 
GeneralRe: Get an "index" for a field of a class? Pin
blackblizzard19-Feb-10 0:30
blackblizzard19-Feb-10 0:30 
QuestionMemory Leak in WPF. Multiple instances of the same control in memory. [modified] Pin
AWriter18-Feb-10 23:03
AWriter18-Feb-10 23:03 
AnswerRe: Memory Leak in WPF. Multiple instances of the same control in memory. Pin
Saksida Bojan19-Feb-10 20:21
Saksida Bojan19-Feb-10 20:21 
Questiongrid view row copy Pin
Syed Shahid Hussain18-Feb-10 23:01
Syed Shahid Hussain18-Feb-10 23:01 
AnswerRe: grid view row copy Pin
Saksida Bojan19-Feb-10 20:14
Saksida Bojan19-Feb-10 20:14 
QuestionDatagridViewColumn displayIndex - column order wrong after setting them from control settings table. Pin
PoppysDad18-Feb-10 22:48
PoppysDad18-Feb-10 22:48 
Hi,

I have a datagridview upon which I allow the user to re-order the columns. I then store the column order in a sqlServer database table. When the user starts the datagridview my code reads the database and retreives the user's column positions.

The code loops through the columns and sets the displayIndex as previously saved. No problems except the columns are displayed in the wrong orderConfused | :confused: The effect is rather inconsistent and not all the columns are in the wrong order.

Under the debugger I can see the displayindices are correctly set as per the database table. The columns just appear in the wrong place on-screenUnsure | :~

I have a fix Smile | :) I simply run the code that sets the displayIndices twice. The problem goes away (well up to now).

I wonder if anyone has had similar displayIndex problems and has a better fix? I have one or two comments in my code saying //DONT REMOVE THIS CODE. IT LOOKS WRONG BUT IS FIXING AN ISSUE.

Terry
AnswerRe: DatagridViewColumn displayIndex - column order wrong after setting them from control settings table. Pin
Vishal Bhatt115-Sep-10 22:58
Vishal Bhatt115-Sep-10 22:58 
AnswerRe: DatagridViewColumn displayIndex - column order wrong after setting them from control settings table. Pin
Zombie_Inc18-Nov-10 20:24
Zombie_Inc18-Nov-10 20:24 
GeneralRe: DatagridViewColumn displayIndex - column order wrong after setting them from control settings table. Pin
henhao8-May-11 7:23
henhao8-May-11 7:23 
QuestionHow to check if Excel-workbook is empty? Pin
Thomas ST18-Feb-10 22:28
Thomas ST18-Feb-10 22:28 
AnswerRe: How to check if Excel-workbook is empty? Pin
Thomas ST18-Feb-10 22:41
Thomas ST18-Feb-10 22:41 
GeneralRe: How to check if Excel-workbook is empty? Pin
Member 766206128-Feb-11 21:40
Member 766206128-Feb-11 21:40 
QuestionTemporary Modification in a Control During Drag and Drop Pin
Som Shekhar18-Feb-10 22:11
Som Shekhar18-Feb-10 22:11 
AnswerRe: Temporary Modification in a Control During Drag and Drop Pin
Luc Pattyn19-Feb-10 0:26
sitebuilderLuc Pattyn19-Feb-10 0:26 
GeneralRe: Temporary Modification in a Control During Drag and Drop Pin
Som Shekhar19-Feb-10 0:35
Som Shekhar19-Feb-10 0:35 
Questionproject using c#.net and sql server 2005 Pin
savitha87k18-Feb-10 20:37
savitha87k18-Feb-10 20:37 
AnswerRe: project using c#.net and sql server 2005 Pin
Saksida Bojan18-Feb-10 20:48
Saksida Bojan18-Feb-10 20:48 
QuestionHow to delete duplicate nodes from XML throgh C# Pin
deadlyabbas18-Feb-10 18:41
deadlyabbas18-Feb-10 18:41 
AnswerRe: How to delete duplicate nodes from XML throgh C# Pin
Saksida Bojan18-Feb-10 20:46
Saksida Bojan18-Feb-10 20:46 
QuestionSelect a HostName with Regex in C# ? Pin
Mohammad Dayyan18-Feb-10 17:19
Mohammad Dayyan18-Feb-10 17:19 
AnswerRe: Select a HostName with Regex in C# ? Pin
tonyonlinux18-Feb-10 18:05
tonyonlinux18-Feb-10 18:05 
GeneralRe: Select a HostName with Regex in C# ? Pin
Mohammad Dayyan18-Feb-10 21:55
Mohammad Dayyan18-Feb-10 21:55 
GeneralRe: Select a HostName with Regex in C# ? Pin
AspDotNetDev18-Feb-10 23:01
protectorAspDotNetDev18-Feb-10 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.