15,906,569 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by kiranrahir (Top 10 by date)
kiranrahir
19-Aug-13 7:04am
View
@Naz_Firdouse
i know c# code for <setter property="Background" value="Green" /> but that is not a solution
kiranrahir
19-Aug-13 6:54am
View
Deleted
I want only c# code solution
kiranrahir
19-Aug-13 6:46am
View
I updated question.
Problem is that i can not write resource part in XAML.
want code behind
kiranrahir
19-Aug-13 6:34am
View
Yes i m using devexpress and want to change style because i want to apply conditinal formating
kiranrahir
5-Aug-13 1:12am
View
Hi thanks for your kind support :). But an internal error was there in our class i made new example and it works perfectaly :)
kiranrahir
3-Aug-13 7:17am
View
I do not need to style for ctl_Child_Grid
kiranrahir
3-Aug-13 7:16am
View
i am new to wpf .
-> as per example of dev express i set binding path "RowData.Row.Qty".
if any other example is there than you can suggest me. May be i m wrong at that place but i do not know what to write
-> as you said i may assign style too late when all cells are already filled.
but just after assigning itemsource i set style.
_Left_Part_DE.ItemsSource = dtItem_Closing_Stock.DefaultView;
_Left_Part_DE.Columns["Qty"].CellStyle = Style;
-> i debug the code. and code assigns source and style both.
-> i enable trace but it didnt arice binding error in output
-> grid is only for display purpose it is not editable
-> i comment out condition in converter and return only red and put breakpoint at the Convert Method
:( but it is not invoked
kiranrahir
3-Aug-13 6:05am
View
May you think that i m stupid but i am not seeing any Code Snippet.
in my code i add
xaml part
<dc:GridControl Name="Left_Part_DE" >
<dxg:GridControl.DetailDescriptor>
<dxg:DataControlDetailDescriptor Name="ctlDataControlDetailDescriptor" >
<dxg:DataControlDetailDescriptor.DataControl>
<dc:GridControl AutoPopulateColumns="True" Name="ctl_Child_Grid">
<dxg:GridControl.View>
<dxg:TableView ShowGroupPanel="False" AutoWidth="True" NavigationStyle="Row" />
</dxg:GridControl.View>
</dc:GridControl >
</dxg:DataControlDetailDescriptor.DataControl>
</dxg:DataControlDetailDescriptor>
</dxg:GridControl.DetailDescriptor>
<dxg:GridControl.View>
<dxg:TableView ShowGroupPanel="False" AutoWidth="True" NavigationStyle="Row" />
</dxg:GridControl.View>
</dc:GridControl>
c# part
Style _Style = new Style(typeof(CellContentPresenter));
Setter _Setter = new Setter();
_Setter.Property = CellContentPresenter.BackgroundProperty;
_Setter.Value = new Binding("RowData.Row.Qty") { Converter = new RedConverter() };
_Style.Setters.Add(_Setter);
_Left_Part_DE.Columns["Qty"].CellStyle = Style;
but problem is that no error occur nor event is invoking for background.
Am i missing any thing?
kiranrahir
3-Aug-13 1:05am
View
I want exactly that. I had read that artical, but problem is that my itemsouce is not fixed so
cant add this code
<dxg:gridcontrol.resources xmlns:dxg="#unknown">
<Style x:Key="customCellStyle"
BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=CellStyle}}"
TargetType="dxg:CellContentPresenter">
<setter property="Background" value="{Binding Path=RowData.Row.UnitsOnOrder, Converter={local:IntToColorConverter}}"></setter>
</Style>
</dxg:gridcontrol.resources>
i want its behind c# code. How can i assign Style to cellstyle
kiranrahir
2-Aug-13 8:15am
View
_Left_Part_DE is my DevExpress.XtraGrid grid and "Qty" is column.
I want to use Style.
if Qty < 0 than cell forecolor should be red. Can i do it with Style - IValueConverter?
Show More