Re: Dynamically formatting a row in a Data Grid



hi

you have to do your own DataGridTextBoxColumn and override the Paint Method.
there is currently no other way to do that in .net 1.1 with the MS Data
Grid. but doing at your own needs about 10 codelines.. so nothing complex.

there are good articles about formating on codeproject:
http://www.codeproject.com/csharp/PracticalGuideDataGrids4.asp
http://www.codeproject.com/csharp/Apply_DataGridTableStyle.asp

there are several examples on the net:
http://groups.google.ch/group/microsoft.public.dotnet.framework.windowsforms.controls/browse_thread/thread/eb02d5da559d428c/b69052d31948b624?lnk=st&q=color+DataGridTextBoxColumn&rnum=2&hl=de#b69052d31948b624
or
http://groups.google.ch/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/f61d69474b1643b4/4ff50628a6dba523?lnk=st&q=color+DataGridTextBoxColumn&rnum=7&hl=de#4ff50628a6dba523

good luck
jazper


.



Relevant Pages

  • Re: Simple Problem
    ... Andrew Thompson wrote: ... >>The problem that I am having is when I add the paint method, ... > you override paintComponent() instead. ... Surely you want your applet to be setting the status ...
    (comp.lang.java.help)
  • Re: TreeView text nodes wordwrap
    ... override so that I ... it looks like the TreeView just has one Paint method and if I ... > f> worth a try at overloading the class and customizing the way the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Text in a scroll bar
    ... Yes, inherit the scrollbar component, override the paint method, and make ... inherit the normal checkbox and totally replace (override) its paint method. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Overriding Methods
    ... I want to override the paint method of a Windows.Forms.Panel. ... I have to manually type the override paint method? ... IIRC, you can just hit Ctrl-Space when in the derived type but outside ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how to add a image-collumn to datagrid
    ... I've got recently similar problem and I solve it by overiding ... DataGridTextBoxColumn and its paint method, ... picture. ...
    (microsoft.public.dotnet.framework.compactframework)