ultrawingrid


show Rich text Formatted data in an infragistics win grid cell


How do I show Rich text Formatted Text in an Ultra Win Grid cell (infragistics). I am storing this data as a varbinary(MAX) in the database.
With Infragistics you have a lot of options how to implement this feature.
Let me show you the easiest way:
Set column properties after you set Grid.DataSource property:
UltraGridColumn c = null;
/// initialize c here. Lets suppose that it has a "rtf" key.
c.Style = ColumnStyle.FormattedTextEditor;
((FormattedLinkEditor) c.Editor).UnderlineLinks = UnderlineLink.Always;
((FormattedLinkEditor)c.Editor).LinkClicked += new Infragistics.Win.FormattedLinkLabel.LinkClickedEventHandler(rtfColumnn_LinkClicked);
c.MaskClipMode = MaskMode.Raw;
((FormattedLinkEditor) c.Editor).TreatValueAs = TreatValueAs.FormattedText;
Allow users to open links in rtf text:
private void rtfColumnn_LinkClicked(object sender, Infragistics.Win.FormattedLinkLabel.LinkClickedEventArgs e)
{
e.OpenLink = true;
}
Subscribe for event BeforeEnterEditMode:
bindingGrid.BeforeEnterEditMode += this.Grid_BeforeEnterEditMode;
And show a nice infragistics rtf editor instead of incell editing:
private void Grid_BeforeEnterEditMode(object sender, System.ComponentModel.CancelEventArgs e)
{
if (Grid.ActiveCell.Column.Key=="rtf")
{
Infragistics.Win.SupportDialogs.FormattedTextEditor.FormattedTextUIEditorForm rtf_frm =
new FormattedTextUIEditorForm();
rtf_frm.Value = Grid.ActiveCell.Value;
DialogResult dresult = rtf_frm.ShowDialog();
if (dresult == DialogResult.OK)
{
Grid.ActiveCell.Value = rtf_frm.Value;
}
e.Cancel = true;
return;
}
}

Related Links

Infragistics wingrid
WinGrid column IntegerWithSpin starting value
show Rich text Formatted data in an infragistics win grid cell

Categories

HOME
elixir
vhdl
jar
websphere
firebase-app-indexing
bower
visual-studio-2013
sbt-assembly
xtext
netflix-feign
dropbox
rfid
android-source
abcpdf
ida
eclipse-luna
ejs
riak
cross-platform
sql-tuning
python-unicode
alfresco-share
pyephem
sonarqube-msbuild-runner
uiautomator
autolayout
spring-test
non-deterministic
croppic
skmaps
osmdroid
frp
aurelia-binding
datadog
blackboard
construct-2
hawtio
body-parser
powershell-remoting
passenger
precedence
wfp
vmd
s3cmd
floating-accuracy
constants
rich-text-editor
estimation
ideone
data-integration
jgraph
cgcontext
component-pascal
windows-95
rpostgresql
info
bettercms
lotus
coremidi
picasa
update-site
multifile-uploader
asteriskami
listadapter
clob
spinlock
financial
group-concat
function-fitting
apigee-baas
graphical-logo
crash-dumps
inputaccessoryview
odftoolkit
jstat
emma
joox
resource-files
android-json-rpc
facebook-chat
angulartics
cdata
gridworld
cgpath
mozart-mvc
css-tables
radchart
gdt
getstring
shared-objects
coff
surefire
unreachable-code
idictionary
grooveshark
openvg
plinq
longjmp
soft-keyboard
economics
ajaxpro
standardized

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App