Windows Develop Bookmark and Share   
 index > Windows Forms General > datagridview column readonly after convert
 

datagridview column readonly after convert

I have a dgv which is bound to a data source and the problem is that I changed the Fill method of the datatable because I needed a different view of the datetime columns(something like CONVERT(...)...). But the problem is that this way my columns are readonly beacause the source of the information is readonly is there a way to bypass this problem. I don't know maybe the columns are not bound correctly.

Thanks in advance.
  • Moved byTaylorMichaelLMVPTuesday, October 06, 2009 7:01 PMWinForms related (From:Visual C# General)
  •  
UzUrp470r  Tuesday, October 06, 2009 6:02 PM
Maybe you could find a way to do the conversion in your application instead of in SQL.

For example, the DataGridView columns have a Format property that you can set in the designer to do reformatting.

For bound fields outside of a DataGridView, you can implement custom Binding.Parse and Binding.Format events to control what is displayed in the bound field onscreen.
  • Marked As Answer byUzUrp470r Wednesday, October 07, 2009 6:48 AM
  •  
BinaryCoder  Tuesday, October 06, 2009 11:32 PM
Maybe you could find a way to do the conversion in your application instead of in SQL.

For example, the DataGridView columns have a Format property that you can set in the designer to do reformatting.

For bound fields outside of a DataGridView, you can implement custom Binding.Parse and Binding.Format events to control what is displayed in the bound field onscreen.
  • Marked As Answer byUzUrp470r Wednesday, October 07, 2009 6:48 AM
  •  
BinaryCoder  Tuesday, October 06, 2009 11:32 PM
Using the format property works like a charm when I set the the correct CultureInfo and had no point in converting the data in SQL. Thanks u pointed me in the right direction.
UzUrp470r  Wednesday, October 07, 2009 6:51 AM

You can use google to search for other answers

Custom Search

More Threads

• How to Hide/Show the node of the TreeView?
• Windows XP Splash Screen
• Programming application for TaskBar
• open with in vb2005
• Supporting a Proxy Server/Firewall
• Repeating Objects List on a winform
• Making a label button...
• Saving contents of a graphics
• Resizing Drag & drop control at run time
• Draw Windows Standard SizingGrip