Telerik Forums
UI for WPF Forum
5 answers
103 views
Hi Support Team,

I am using the following Way to do. Steps are following:

1. I create a new Column Group and Added a label and stack panel with 4 buttons and place all of them in Grid like following  in the code and finally assigned that grid into Header Template of RadGridView property.

<DataTemplate

xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""

xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""

xmlns:Tele=""http://schemas.telerik.com/2008/xaml/presentation""

xmlns:Event=""clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity""

xmlns:cmd=""clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"" >

<Grid HorizontalAlignment=""Stretch"" VerticalAlignment=""Stretch"" Background=""#EAF3FC"" Name=""grdcolumnHeader2"" >

<Grid.RowDefinitions>

<RowDefinition Height=""23""></RowDefinition>

</Grid.RowDefinitions>

<Grid.ColumnDefinitions>

<ColumnDefinition Width=""*""></ColumnDefinition>

<ColumnDefinition Width=""Auto""></ColumnDefinition>

</Grid.ColumnDefinitions>

<Label Name=""lblMonthName"

 

 

+ groupIndex.ToString() + @""" Grid.Row=""0"" Grid.Column=""0"" HorizontalAlignment=""Stretch"" HorizontalContentAlignment=""Center"" Padding=""0"" Margin=""0,2,0,0"" FontWeight=""DemiBold""

Content="""

 

 

+ monthContent + @"""></Label>

</Grid>

</DataTemplate>";

2. After creating new column Group, adding it into RadGridView like following and assigned it name like "month1"
RadGridView1.ColumnGroups.add(newColumnGroup);
3. the created dynamic columns based on no of days in a months and assigned column group name "month1"

newcolumn.ColumnGroupName="month1";

RadGridView1.Columns.Add(newcolumn);

This functionality works fine in version 2011 Q3 and 2012 Q2 releases.

But my issues is when I use 2012 Q2 version of telerik controls the Label controls and Panel with 4 buttons in the Colum Group Header does not cover all the columns and leave black color space at right side columns. screen shot has been attached with this thread. Please have a look and provide solution.

Note: If you do not understand anything please let me know. I will explain further.
Please help me to resove this issue. I am running out of solution.

Thanks
Laxman




 

 


 

Laxman
Top achievements
Rank 1
 answered on 30 Oct 2012
3 answers
198 views
Hi Support Team,

I would like to change the background color of GroupPanel items, by default it shows black color. I would like to change it to different color as per customer requirement. An Image has been attached for your better understanding.

Thanks
Laxman

Laxman
Top achievements
Rank 1
 answered on 30 Oct 2012
2 answers
205 views
Hi Support Team,

I want to remove borders from Grid View Header Row. I am using the following style to set the Background, Foreground and BorderThickness that style is following:

Style x:Key="GridHeaderRowStyle" TargetType="Tele:GridViewHeaderRow">
                        <Setter Property="Background" Value="#EAF3FC"/>
                        <Setter Property="Foreground" Value="#EAF3FC"/>
                        <Setter Property="BorderBrush" Value="#EAF3FC"/>
                        <Setter Property="BorderThickness" Value="0,0,0,0"/>
                        <Setter Property="Padding" Value="0,0,0,0"/>
                        <Setter Property="Margin" Value="0,0,0,0"/>
                       
                    </Style>
It changes the BackGround color but did not removing Borders. Image has been attached for your reference. You can have a look.
Please provide me the style how to do that. I don't know Expression Blend how to create styles.

Hope someone will help me to solve this issue.

Thanks
Laxman


Laxman
Top achievements
Rank 1
 answered on 30 Oct 2012
4 answers
585 views
Hello,


We are using 2012 Q3
I am AutoGenerating columns from a datatable to populate a RadGridView.

In the table there are columns who's DataType is a tuple with a couple strings, defined as "characteristic columns".

I tried setting the cell template using the following code,

        private void OneStopGrid_DataLoaded(object sender, EventArgs e)
        {
            foreach (GridViewColumn column in OneStopGrid.Columns)
            {
                if (ViewModel.CharacteristicColumns.Any(c => c.Name == column.Header))
                {
                    column.CellTemplate = (DataTemplate)this.FindResource("HistoryTemplate");
                }
            }
        }

The history template is a stackpanel containing a textblock which basically binds to one of the strings using Text="{Binding Item1}", and a rectangle which is standing in for a button.

The cell template is correctly set, but the datacontext is wrong, when I set the binding to Text="{Binding}" it showed that in the cells the datacontext was the DataRow.

I looked on the forums and found

http://www.telerik.com/community/forums/wpf/gridview/programmatically-creating-templated-columns.aspx

which advised me to to go to

http://blogs.telerik.com/vladimirenchev/posts/10-05-13/how-to-custom-percentage-column-with-radgridview-radprogressbar-and-radslider-for-silverlight-and-wpf.aspx

I set up a custom column as recommended and overrode the CreateCellElement using the following code


Then I used the ColumnsGenerating event to set up the columns as my custom column

        private void OneStopGrid_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
        {
            if (ViewModel.CharacteristicColumns.Any(c => c.Name == e.Column.Header))
            {
                var templateColumn = new GridViewCharacteristicColumn();
                templateColumn.Header = e.Column.Header;

                e.Column = templateColumn;
            }
        }

Unfortunately I am still having the same problem. The Context is still the DataRow.

Anything I can do to get the binding to work correctly?


Thank you.
Eli
Top achievements
Rank 1
 answered on 29 Oct 2012
1 answer
209 views
I try to do this by using this Thread's Posts but when I Paste Some text contain hyperlink in my RadRichTextBox , It shows the hyperlinks as usual way and doesn't remove Its styles and etc.
I Want remove any styles, Images, Tables, Bullets, etc of document's content like when paste Clipboard in TextBox.
Petya
Telerik team
 answered on 29 Oct 2012
1 answer
141 views
Hi,

I seem to get a NullReferenceException from time to time when I assisigning the ScrollBarValueChanged event. It doesn't always throw the exception, and I can't quite work out how this is happening.
this.radRichTextBox.VerticalScrollBar.ValueChanged += radRichTextBox_ScrollBarValueChanged;


I assigned it in my RadRichTextbox loaded event:
private void radRichTextBox_Loaded(object sender, RoutedEventArgs e)
{
            //Set ListBoxItems
            AutoCompleteSetListBoxItems(1);
            //Set Autocomplete ListBox itemssource
            radListBox.ItemsSource = autoCompleteListItems;
 
            //Assign DocumentArranged event. This will in turn enable document changed event.
            this.radRichTextBox.DocumentArranged += radRichTextBox_DocumentArranged;
 
            //Assign CommandExecuting Event. This will catch cut, copy, paste etc
            this.radRichTextBox.CommandExecuting += radRichTextBox_CommandExecuting;
 
            //Assign Scroll Event To Reposition Popup AutoComplete Window
            this.radRichTextBox.VerticalScrollBar.ValueChanged += radRichTextBox_ScrollBarValueChanged;
}



Here's the stack trace:

   at TAS2.RadRichTextBoxAutoComplete.radRichTextBox_Loaded(Object sender, RoutedEventArgs e) in C:\TAS2 - Q3 2012\TAS2\RadRichTextBoxAutoComplete.xaml.cs:line 195
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at TAS2.App.Main() in C:\TAS2 - Q3 2012\TAS2\obj\x86\Debug\App.g.cs:line 0



System.Reflection.RuntimeMethodInfo:
{Void radRichTextBox_Loaded(System.Object, System.Windows.RoutedEventArgs)}


Has anyone come across this error before?

Thanks for your time,

Rob

Petya
Telerik team
 answered on 29 Oct 2012
2 answers
231 views
Hello,

I'm looking for a way to disable the default Ctrl+V behavior, which simply creates a blank appointment (bypassing all validation).  I tried defining my own command bindings to override the default behavior as exemplified in the sample project included in this post  http://www.telerik.com/community/forums/silverlight/scheduleview/copy-paste-appointment.aspx;  however, I cannot find the appropriate namespace for CommandManager.SetCommandBindings().  System.Windows.Input.CommandManager does not contain a definition for SetCommandBindings, and I cannot find CommandManager under Telerik.Windows.Controls.   Likewise, when specifying <telerik:CommandManager.InputBindings> in XAML, I get 'The attachable property InputBindings was not found in type CommandManager'.  Am I missing something or is this only meant to work in Silverlight? 

I'm using the latest Q3 release.

Thanks in advance..
Vic
Vic
Top achievements
Rank 1
Iron
 answered on 29 Oct 2012
2 answers
173 views
How can I determin in code which column is sorted in a RadGridView?
This always returns null

if (grid.CurrentColumn != null)
{
    DoSomething
}
else
    MessageBox.Show("No column selected");
Jeff
Top achievements
Rank 1
 answered on 29 Oct 2012
1 answer
99 views
I have a GridView with a GridViewDataColumn, EditTriggers is set to TextInput and F2. I select a cell and begin typing input. When the first character is entered it becomes highlighted essentially causing me to override the first letter with any subsequent characters. 

Essentially the same problem as in http://www.telerik.com/community/forums/winforms/gridview/editmode-rewrites-first-character.aspx

But that post says the issue has been addressed so possibly a different bug?
Yoan
Telerik team
 answered on 29 Oct 2012
2 answers
129 views

r.a.d.datepicker dont support other language date!!!

Dotnetnuke use this plugin in core va date use this object but dont can use this object for show date

r.a.d.datepicker dont support 1400 year or dates under 1980
when this bug is fix ?????????

arash
Top achievements
Rank 1
 answered on 29 Oct 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?