Telerik Forums
UI for WinForms Forum
1 answer
96 views
Hi Team,

I working with GridView Q2 2007 When I use propery builder for condtional formatting to provide condition if valu is less than 0 then color shld be red.
It is giving me error.
Please provide solution how to set it through property builder step by step.

Thanks
Nicky
Jack
Telerik team
 answered on 17 Oct 2007
1 answer
153 views
hi,

i wanted to restore all elements into my docking manaer,  i could not use this solution as i do not know how many panells i will have and what kind of usercontorlls they will host , i do not want to make if/then for each control deserialization so I wrot this code, which uses aditional xml file to store data about controls stored in panels, and than it uses reflection to reinitilize it


private void SaveLayout()

{

dockingManager1.SaveXML(fileName);

XmlDocument doc = new XmlDocument();

XmlElement root = doc.CreateElement("SerializedControlCollection");

doc.AppendChild(root);

//go through the sites

foreach (IDockingSite site in dockingManager1.DockingSites)

{

//now get panels

foreach (DockPanel pan in site.ManagedDockables)

{

//check if there is anything in panel

if (pan.Controls.Count > 0)

{

//get first child of panel, this one is interesting for me

UserControl userControl = pan.Controls[0] as UserControl;

//check if this is user control

if (userControl != null)

{

XmlElement contElement = doc.CreateElement("Control");

XmlAttribute att = doc.CreateAttribute("DockableGuid");

contElement.Attributes.Append(att);

att.InnerText = pan.ID.ToString();

contElement.InnerText = userControl.GetType().FullName;

root.AppendChild(contElement);

}

}

}

}

doc.Save(controlFile);

}


private void RestoreLayout()

{

if (File.Exists(fileName))

{

dockingManager1.LoadXML(fileName);

}

XmlDataDocument controlInfo = new XmlDataDocument();

controlInfo.Load(controlFile);

//create hashtable to make it easier later

Dictionary<string, string> idToTypeMap=new Dictionary<string, string>();

foreach (XmlElement el in controlInfo.FirstChild.ChildNodes)

{

string guid = el.GetAttribute("DockableGuid");

idToTypeMap[guid] = el.InnerText;

}

//restore contorls inside

foreach (IDockingSite site in dockingManager1.DockingSites)

{

//now get panels

foreach (DockPanel pan in site.ManagedDockables)

{

if(idToTypeMap.ContainsKey(pan.ID.ToString()))

{

string typeName = idToTypeMap[pan.ID.ToString()];

Type t = this.GetType().Assembly.GetType(typeName);

Control con = (Control) Activator.CreateInstance(t);

pan.Controls.Add(con);

}

}

}

}



Julian Benkov
Telerik team
 answered on 17 Oct 2007
2 answers
96 views
I have a problem with removing dockable elements from panel, i registred a eventhandler and I call 
//pan.DockingSite.Remove(pan);
dckingManager1.PrimarySite.Remove(pan);

//dockingManager1.RemoveDocument(pan);


and than I call SaveLayout, but after loading panel is still there, if i however add a new dockable and save it it will persist .
in examples it is only possible to remove all nodes or add new nodes, so i can not see how (and if this can be implemented)


what i have to do to remove panel and save layout without thid panel ?
thanks
almir
Julian Benkov
Telerik team
 answered on 17 Oct 2007
0 answers
53 views
wrong thread
Lorenzo
Top achievements
Rank 1
 asked on 17 Oct 2007
1 answer
193 views

Hi.

I get problems with conditional formatting.

In the case that you want to set font color (CellForeColor) that depending on the column condition and you set property ‘Apply to row’ is true and also if you create second condition that changing row back color you will lose CellForeColor setup from first condition.

Is it possible to change dynamically “row back color” without using conditional formatting?



 

Jack
Telerik team
 answered on 17 Oct 2007
1 answer
114 views
Hi,

I have created one RadComboBox control whose Text is set as "AutoAnswerComboBox".
Now it has 2 comboBoxItems
1) On
2) Off

When i run the app, I first get to see "AutoAnswerComboBox" and then on click on the combo box, I see the actuall 2 elements.

By default, I want user to first see "On" instead of "AutoAnswerComboBox".

Can you please tell me how to set the first comboboxitem as the first displayed item to the user?

Thanks in advance.

barkha
Nikolay
Telerik team
 answered on 17 Oct 2007
2 answers
114 views
Hi,

I'm using registered version of Rad Controls for WinForms SP2, in particular I'm using DockingManager control.
I have some some dockPanels and some documentPanels. I would like to handle documentPanel_closing events. (Ex: to check if the content was saved by user)

I use the following code:

[DESIGNER - Auto Generated Code]
this.documentPane_Benvenuto.Closing += new System.ComponentModel.CancelEventHandler(this.documentPane_Benvenuto_Closing);

[FORM]
private void documentPane_Benvenuto_Closing(object sender, CancelEventArgs e)
{
MessageBox.Show("documentPane_Benvenuto is closing..");
}

This code doesn't work. When i close the documentPane_Benvenuto the event isn't raised. If i set one breakpoint in the method documentPane_Benvenuto_Closing(...) nothing happen, the method isn't executed.
What is the best way to solve my problem? There is a simple solution o work around to do this?

Thank you very much for support.
Lorenzo
Lorenzo
Top achievements
Rank 1
 answered on 17 Oct 2007
1 answer
124 views
In the online documentation, I saw a page where there is a GridView embedded inside another GridView Object.  I was wondering when it is possible to do embedded GridView?  This feature is one of the features that attracted me to purchase this control.  The below link has an image of what I am talking about (it is under Hierarchical data presentation).

http://www.telerik.com/help/winforms/Q2_2007/grd_Overview_Overview.html

if it is already possible to use this feature, can someone please provide some sample code?  Thank you!

Also, is there a new version coming out?  If so, when is the release date?  Thank you!

Nicky
Jack
Telerik team
 answered on 16 Oct 2007
2 answers
124 views
Hi, I try to bind a gridview to an instance of KeyValueConfigurationCollection as follows:

private void WebHRSnifferForm_Load(object sender, EventArgs e)
        {
            dataBind104ComSettingGrid();

        }
        private void dataBind104ComSettingGrid()
        {
            // QueryStringParams is type of KeyValueConfigurationCollection
            Grid104CompSetting.DataSource = webHRConfig.OneZeroFour.Company.QueryStringParams.GetEnumerator();
        }

But it seems the girdview cannot locate the properties exposed by KeyValueConfigurationElement that is contained within KeyValueConfigurationCollection. So no columns are created.

Is there anything I should implement to let gridview bind to KeyValueConfigurationCollection.

Thanks a lot.
Ricky.

Ricky
Top achievements
Rank 1
 answered on 16 Oct 2007
1 answer
101 views
I got a grid with textboxes, comboboxes and checkboxes. When the user right-clicks (to show my popup menu) I'd like to auto save any changes in last cell edited. How can I do that?
Georgi
Telerik team
 answered on 16 Oct 2007
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?