Telerik Forums
UI for WinForms Forum
3 answers
461 views
Hello, I am using 2010 Q2

1)

I want to display amount in Indian format on grid column.
Is it possible to assign directly using inbuilt formatting?

OR

If not we are using below code for Microsoft Datagridview

NumberFormatInfo RupeeFormat = new NumberFormatInfo(); 
RupeeFormat.NumberGroupSeparator = ","
RupeeFormat.NumberGroupSizes = new int[] {3, 2};
  
//NOTE: default format for decimal type columns 
DataGridViewCellStyle DecimalStyleVal = New DataGridViewCellStyle(); 
DecimalStyleVal.FormatProvider = RupeeFormat;
DecimalStyleVal.Format = ConstantsUtils.PriceFormat; 
DecimalStyleVal.NullValue = "0.00"
DecimalStyleVal.Alignment = DataGridViewContentAlignment.MiddleRight; 

 


Now we are just using this on Form Load  as shown below(not handling any formatting event)

Form_Load
{
    gridview.Columns["Amount"].DefaultCellStyle = DecimalStyleVal ;
}

How to achive this in your grid, by assigning cellstyle only?
This is working perfectly in MS datagridview.

Display Example:
Decimal value = 12345678.95  
( required view )
Display in dgv column = 1,23,45,678.95

Or any alternative to display format as shown in example?

2) How can i apply Numberformat to your gridview column in form loading
3) If possible how to apply for Summary also.

4)
 I have a grid showing Stock price.
Which is updating every second.
I want to apply conditional formatting on that


ConditionalFormattingObject c1 = new ConditionalFormattingObject( "Grater", ConditionTypes.Greater, "5", "", true );
c1.CellBackColor = Color.LightBlue;
c1.CellForeColor = Color.Black;
  
  
ConditionalFormattingObject c2 = new ConditionalFormattingObject( "Less", ConditionTypes.Less, "5", "", true );
c2.CellBackColor = Color.IndianRed;
c2.CellForeColor = Color.Black;
  
ConditionalFormattingObject c3 = new ConditionalFormattingObject( "Equal", ConditionTypes.Equal, "5", "", true );
c3.CellBackColor = Color.White;
c3.CellForeColor = Color.Black;

 
I am using above code for generating conditions.
However, here i am having "5" as a Value1 parameter, instead of that i want to check the same cell value with the new value for same cell

Like say, A column BidPrice have value 50 (Old value backcolor = black)
New price after 1 sec is 51 (New value)

so i want to put conditionalformatting in such a way that it should check Old value and New value for setting cell colors for price change display. in this case "c1" will be applied to the cell after new value.
Display should be BidPrice 51 ( backcolor = blue )

Hope you undderstand wat i want to ask.

Thanks,

Jack
Telerik team
 answered on 11 Feb 2011
1 answer
129 views
If anyone is struggling with your template columns not resizing when your form is resized, after trying misc. things this worked for me.

It appears that the gridview redraws itself, but does not resize template columns.

private void frmMyForm_SizeChanged(object sender, EventArgs e)
        {
            gridViewTemplate1.Refresh();
            gridViewTemplate2.Refresh();
        }
Jack
Telerik team
 answered on 11 Feb 2011
5 answers
337 views
Hi All,

OK I am feeling somewhat stupid at the moment.  I have a Windows forms app with a datagrid on it.  In the menu I have an option to allow the user to resync the database with my main SQL database.  It uses merge replication and it all works fine.  The problem that I am having is stupidly simple by comparison to the task of syncing the data.  Once the syncronisation has finished, I need the datagrid to repopulate itself with any changed data.  2 minute job I thought, an hour later I still am having issues!

There are some threads discussing what I think is the same issue but people seem to be missing the stick and talking about setting the datasource to null and then reconnecting it.  Well that works but the RadGrid seems to then add in all of the hidden ID columns etc again.

Surely there is a command  like Refresh (what does that do anyway?  does it just redraw the grid?) that works on this.  On Asp.Net Refresh does as you'd expect and refreshes the data in the grid. 

All I want to do is tell the grid to reload it's data!

Any ideas anyone?

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 11 Feb 2011
6 answers
163 views
Hello

I am sorry if this is a really simple question, but I can't seem to find the answer.

How do you have a vertical scroll bar in the gridview column chooser?

Thanks

Bex
Svett
Telerik team
 answered on 10 Feb 2011
2 answers
161 views
Hello,
I'm trying to set a filter expression for my MultiColumn combo box. I use the following syntax.

MultiColumnComboBox1.DataSource = DataTable1
MultiColumnComboBox1.DisplayMember = "Iso2"
MultiColumnComboBox1.ValueMember = "Iso2"

MultiColumnComboBox1.MultiColumnComboBoxElement.AutoSizeDropDownToBestFit = True
Dim fe As FilterExpression        
fe = New FilterExpression(MultiColumnComboBox1.DisplayMember, FilterExpression.BinaryOperation.AND, GridKnownFunction.StartsWith)
MultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(fe)
MultiColumnComboBox1.MultiColumnComboBoxElement.AutoCompleteMode = AutoCompleteMode.SuggestAppend
MultiColumnComboBox1.AutoFilter = True


When entering a single letter ito the box, e.g. an "L" the filtered result contains all elements which contains an "L", not only thos which start with an "L". Did I use the parameter GridKnownFunction.StartsWith correctly?
Any help is appreciated.
Sincerely Roberto
Roberto Wenzel
Top achievements
Rank 2
 answered on 10 Feb 2011
7 answers
247 views
Hi,

The RadGridView.Scroll event is not raised when I scroll in a RadGridView. What other event can I handle to execute code when a user is scrolling in a RadGridView?

Thank you.
Jack
Telerik team
 answered on 10 Feb 2011
7 answers
344 views
When SelectionMode is set to 'MultiExtended' the RadDataItem.Selected property will behave as if the Mode is 'One' (clear all other selections).

When SelectionMode is set to 'MultiSimple' and a RadDataItem is added witht the Selected property set to true then the RadDataItem will always show as selected but cannot actually be selected or de-selected. Also when the list is re-ordered then ActiveItem does not stay on the RadDataItem that was active before the re-order.
Stefan
Telerik team
 answered on 10 Feb 2011
1 answer
304 views
Hi I am trying to change the default "check mark" to a custom image. However, I am unable to get a hold of radCheckBox instance.
Richard Slade
Top achievements
Rank 2
 answered on 09 Feb 2011
3 answers
316 views
Hi. I could not use Datasource in Scheduler, the option for select Datasource value does not appears in the window (see image "scheduler.jpg").

My question is... how I can add an appointment to the Scheduler control.

I mean, something like:

Scheduler.Appointments.Add(DATE,HOUR,EVENT)

Thanks.
Dobry Zranchev
Telerik team
 answered on 09 Feb 2011
3 answers
115 views
I have a very simple radChart and I am attempting to set the Fill Type to Gradient and use two KnownColors as the Main and Secondary Color.  I have tried to do this progamatically and through the property panel.  When setting the property in the property panel from Solid to Gradient it immediately goes back to gradient, however I am able to set it to hatched.  Here is the code I am using.  The is still solid white.  Any help would be greatly appreciated.

KnownColor clrTopBackgroundColor = KnownColor.White;
KnownColor clrBottomBackgroundColor = KnownColor.LightBlue;
 
radChart1.PlotArea.Appearance.FillStyle.FillType = FillType.Gradient;
 
radChart1.PlotArea.Appearance.FillStyle.MainColor = Color.FromKnownColor(clrTopBackgroundColor);
radChart1.PlotArea.Appearance.FillStyle.SecondColor = Color.FromKnownColor(clrBottomBackgroundColor);
 
radChart1.Update();
radChart1.UpdateGraphics();


Thank you,
Will 
Evgenia
Telerik team
 answered on 09 Feb 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?