Telerik Forums
UI for WinForms Forum
3 answers
105 views
I would like to format the cells in a GridView column similar to the format of the column header cell.  For example, I would like the first cell in each row to look like it is a header cell.

Is there a way to do this?

Thanks.


Ken...
Alexander
Telerik team
 answered on 25 May 2011
2 answers
464 views
Hi,

This seems like the simplest thing in the world to do, but I have been unable (as yet) to simply remove a treenode from the TreeView control.  I've created a RadForm with JUST a RadTreeView on it, added a handful of items, then simply responded to the SelectedNodeChanged() event to delete the node clicked.  This isn't what it's going to do in real life, but it's a simple test.  It doesn't work if I do the delete from a button event etc.

Here's the list of items:
treeMenu.AllowRemove = true;
treeMenu.NodeRemoved += new RadTreeView.RadTreeViewEventHandler(treeMenu_NodeRemoved);
RadTreeNode rootNode = new RadTreeNode("Menu",true);
RadTreeNode homeMenu = new RadTreeNode("Home",true);
RadTreeNode servicesMenu = new RadTreeNode("Our Services",true);
 
servicesMenu.Nodes.Add(new RadTreeNode("Compliance Services",true));
servicesMenu.Nodes.Add(new RadTreeNode("Support Services",true));
servicesMenu.Nodes.Add(new RadTreeNode("Consultancy & Systems Advice",true));
servicesMenu.Nodes.Add(new RadTreeNode("Business Startup",true));
 
rootNode.Nodes.Add(homeMenu);
rootNode.Nodes.Add(servicesMenu);
 
treeMenu.Nodes.Add(rootNode);

Then the event to delete the selected node:
private void treeMenu_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{
    treeMenu.Nodes.Remove(e.Node);
}

I've set AllowRemove to true in the Design Interface and in the code, but nothing.  I've hooked the NodeRemoved() event to see if it's actually doing it, but nothing. The Event treeMenu_SelectedNodeChanged() is firing fine, and I'm not seeing the NodeRemove() event at all (and nothing is removed from the tree).

Help! This is just bugging me now!

Thanks,
Paul
Svett
Telerik team
 answered on 25 May 2011
20 answers
393 views
Why is always an all day event shown in all day row in radscheduler Q2 2009.
Is it possible to show it in hour row instead?

Before Q2 2009 it was possible. 
Ivan Todorov
Telerik team
 answered on 25 May 2011
1 answer
222 views
Hi,
my gridview has a self-reference relation its first column holds '+' sign to expand a row. when i expand a row the first cell's content
shows it's whole text after expand current row and going to next row, the first cell of the new row's content appears ellipsed and i must resize the first column again to see whole contents of the cell, any ideas to solve this?
thanks.
Svett
Telerik team
 answered on 25 May 2011
3 answers
134 views
Hi,
I want to select data from radgrid (see picture "selectdata.jpg") after that it will bind to MultiColumComboBox (see picture "multicolumcombobox.jpg") but it not work.

My code here
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
    function UpdateItemCountField(sender, args) {
        //set the footer text
        sender.get_dropDownElement().lastChild.innerHTML = "A total of " + sender.get_items().get_count() + " items";
    }
</script>
  
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid2_Search">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel_Search_New" />
                <telerik:AjaxUpdatedControl ControlID="RadGrid2_Search" />
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel_Footer" />
                <telerik:AjaxUpdatedControl ControlID="txtPrdtOrderNo" />
                <telerik:AjaxUpdatedControl ControlID="RadComboBox_Plan" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" Skin="WebBlue" />
  
<table cellspacing="10" width="100%">
    <tr>
        <td class="style20"></td
        <td class="styleLbl">PrdtOrderNo: </td>
        <td class="styleTxtBox">
            <asp:TextBox ID="txtPrdtOrderNo" runat="server" Width="150px" Visible="false" ></asp:TextBox>
        </td>
        <td>
            <telerik:RadAjaxPanel ID="RadAjaxPanel_Search_New" runat="server">
                <asp:Button ID="btnSearch" runat="server" Text="¤é¹ËÒ" Width="100px" />  
                <asp:Button ID="btnNew" runat="server" Text="New" Width="100px" />
            </telerik:RadAjaxPanel>
        </td>
    </tr>
    <tr>
        <td class="style20"></td>  
        <td class="styleLbl">Plan : </td>
        <td class="styleTxtBox">
            <telerik:RadComboBox runat="server" ID="RadComboBox_Plan" Height="150px"
                Width="200px" MarkFirstMatch="true" DataSourceID="SqlDataSource_Plan" 
                DataValueField="planNo"
                EnableLoadOnDemand="true"
                HighlightTemplatedItems="true" AppendDataBoundItems="true"
                OnClientItemsRequested="UpdateItemCountField"
                OnDataBound="RadComboBox_Plan_DataBound"
                OnItemDataBound="RadComboBox_Plan_ItemDataBound"
                OnItemsRequested="RadComboBox_Plan_ItemsRequested" Skin="WebBlue">
                <Items>
                    <telerik:RadComboBoxItem Text="--Please Select--" Value="" Selected="true"/>     
                </Items>
                <HeaderTemplate>
                    <ul>
                        <li class="col1">Plan No</li>
                        <li class="col2">Plan Date</li>
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul>
                        <li class="col1">
                            <%#DataBinder.Eval(Container.DataItem, "planNo")%></li>
                        <li class="col2">
                            <%#DataBinder.Eval(Container.DataItem, "date", "{0:dd/MM/yyyy}")%></li>
                    </ul>
                </ItemTemplate>
                <FooterTemplate>
                    A total of
                    <asp:Literal runat="server" ID="RadComboItemsCount" />
                    items
                </FooterTemplate>
            </telerik:RadComboBox>  
            <asp:SqlDataSource ID="SqlDataSource_Plan" runat="server" 
                ConnectionString="<%$ ConnectionStrings:projectConnectionString %>" 
                SelectCommand="SELECT planNo, date FROM [Plan] ORDER BY date">
            </asp:SqlDataSource>
        </td>
        <td>
            <asp:RequiredFieldValidator runat="server" 
                    ID="ReqFieldValidate_ddlPlan" ControlToValidate="RadComboBox_Plan"
                    ErrorMessage="*" ValidationGroup="ForSave" Display="Dynamic"
                    InitialValue="--Please Select--" />   
        </td>
    </tr>
</table>
  
  
<table cellspacing="10" width="100%">    
    <tr>
        <td class="style20"></td
        <td colspan="2">
            <telerik:RadGrid ID="RadGrid2_Search" runat="server" 
                    AllowAutomaticDeletes="True"
                    AllowAutomaticUpdates="True" DataSourceID="SqlDataSource2_Search"
                    AllowAutomaticInserts="True"  
                    AutoGenerateColumns="False"  
                    GridLines="None" Width="100%" Skin="WebBlue">
                <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
                <MasterTableView DataKeyNames="prdtOrderNo, planNo, planDate, date, productNo, productName, qtyPrdtOrder, qtyProduce, status, remark" 
                        DataSourceID="SqlDataSource2_Search"
                        NoMasterRecordsText="No records to display."
                        AutoGenerateColumns="false" Name="ProductionOrder_Search">
                    <Columns>
                        <telerik:GridBoundColumn DataField="prdtOrderNo" DefaultInsertValue="" 
                            HeaderText="prdtOrderNo" SortExpression="prdtOrderNo" 
                            UniqueName="prdtOrderNo" ReadOnly="True" Display="false">
                        </telerik:GridBoundColumn>                   
                        <telerik:GridBoundColumn DataField="planNo" DefaultInsertValue="" 
                            HeaderText="planNo" SortExpression="planNo" 
                            UniqueName="planNo" ReadOnly="True">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="planDate" DefaultInsertValue="" 
                            HeaderText="planDate" SortExpression="planDate" UniqueName="planDate"
                            DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>                        
                        <telerik:GridBoundColumn DataField="date" DefaultInsertValue="" 
                            HeaderText="date" SortExpression="date" UniqueName="date"
                            DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="productName" DefaultInsertValue="" 
                            HeaderText="productName" SortExpression="productName" UniqueName="productName">
                        </telerik:GridBoundColumn>                        
                        <telerik:GridBoundColumn DataField="qtyPrdtOrder" DefaultInsertValue="" 
                            HeaderText="qtyPrdtOrder" SortExpression="qtyPrdtOrder" UniqueName="qtyPrdtOrder" 
                            ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="qtyProduce" DefaultInsertValue="" 
                            HeaderText="qtyProduce" SortExpression="qtyProduce" UniqueName="qtyProduce"
                            ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="status" DefaultInsertValue="" 
                            HeaderText="status" SortExpression="status" UniqueName="status">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="remark" DefaultInsertValue="" 
                            HeaderText="remark" SortExpression="remark" UniqueName="remark" Visible="false">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource2_Search" runat="server" 
                ConnectionString="<%$ ConnectionStrings:projectConnectionString %>" 
                SelectCommand="SELECT ProductionOrder.prdtOrderNo, ProductionOrder.planNo, [Plan].date AS planDate, ProductionOrder.date, ProductionOrder.productNo, Product.productName, [Plan].qtyPlan, ProductionOrder.qtyPrdtOrder, ProductionOrder.qtyProduce, ProductionOrder.status, ProductionOrder.remark FROM [Plan] INNER JOIN Product ON [Plan].productNo = Product.productNo INNER JOIN ProductionOrder ON [Plan].planNo = ProductionOrder.planNo">
            </asp:SqlDataSource>
        </td>
    </tr>
</table>
  
<center>
    <telerik:RadAjaxPanel ID="RadAjaxPanel_Footer" runat="server">    
        <asp:Button ID="btnSave" runat="server" Text="Save" Width="100px" ValidationGroup="ForSave" />  
        <asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="100px"/>
    </telerik:RadAjaxPanel>
</center>
  
<asp:SqlDataSource ID="SqlDataSource_ddlProduct" runat="server" 
        ConnectionString="<%$ ConnectionStrings:projectConnectionString %>" 
        SelectCommand="SELECT productNo, productName FROM Product WHERE status = 'Active'">
</asp:SqlDataSource>
  
</asp:Content>

Protected Sub RadComboBox_Plan_DataBound(ByVal sender As Object, ByVal e As EventArgs)
    'set the initial footer label
    CType(RadComboBox_Plan.Footer.FindControl("RadComboItemsCount"), Literal).Text = Convert.ToString(RadComboBox_Plan.Items.Count)
End Sub
Protected Sub RadComboBox_Plan_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)
    SqlDataSource_Plan.SelectCommand = "SELECT planNo, date FROM [Plan] ORDER BY date"
    RadComboBox_Plan.DataBind()
End Sub
Protected Sub RadComboBox_Plan_ItemDataBound(ByVal sender As Object, ByVal e As RadComboBoxItemEventArgs)
    'set the Text and Value property of every item
    'here you can set any other properties like Enabled, ToolTip, Visible, etc.
    e.Item.Text = Convert.ToDateTime(DirectCast(e.Item.DataItem, DataRowView)("date").ToString()).ToString("dd/MM/yyyy")
    e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("planNo").ToString()
End Sub
Private Sub RadGrid2_Search_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid2_Search.SelectedIndexChanged
    '''' set header
    txtPrdtOrderNo.Text = RadGrid2_Search.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid2_Search.SelectedItems(0).ItemIndex)("prdtOrderNo")
    RadComboBox_Plan.SelectedValue = RadGrid2_Search.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid2_Search.SelectedItems(0).ItemIndex)("planNo")
End Sub

Thanks

Vasil
Telerik team
 answered on 25 May 2011
1 answer
132 views
Hi,

                 I am using radscheduler ,i want to know the properties it has a property activeviewtype =day,week,timeline

for janus i am using like this for workweek to be shown

scheduler1.View = Janus.Windows.Schedule.

 

ScheduleView.WorkWeek;


foe telerik radscheduler how can i write please can anyone tell me regarding this i tried by using
radscheduler1.ActiveViewType property but couldnt do it


Thanks
Divya

 

Stefan
Telerik team
 answered on 25 May 2011
4 answers
132 views
Hi, In the ItemDataBound event i use the following code to change the height of the items:
args.NewItem.Height = 35

But with filtered items the height gets reset.
I've searched over the internet for an event or property
but couldn't find how to keep the height unchanged.
Please help.
Thank you.
Peter
Telerik team
 answered on 25 May 2011
7 answers
184 views
I'm using a DateTimePicker for time entry by setting Format = Custom and CustomFormat = "h:mm tt"  (ex, 12:34 PM) This is working fine as long as I have a value assigned.

Sometimes I don't have a value for this field and would like to display the NullText.  When working with dates, I call SetToNullValue() and the NullText is displayed.  However, with the way I've set up the picker for times, the NullText is not displayed and I'm left with an empty data entry text box.  This also happens when Format = Time, so I think the issue is related to not displaying the date, rather than what the time format is.

Is there a way to use the CustomFormat mentioned above and also get the NullText to display after SetToNullValue() is called?  I don't care what the date value is and only need resolution of minutes, so tricks involving setting the date or time to special values are probably ok.

Thanks,
DaveL
Stefan
Telerik team
 answered on 25 May 2011
2 answers
87 views
Good morning


i have the next doubt....i have a grid with information and i need that the end-user can copy the information that it containt but i run the application and i see the information in the grid i use click-right -> copy after that i am going to paste in for exaple excel or notepad but it doesn't work.. its possible ..

Thanks for your information..
Emilio
Stefan
Telerik team
 answered on 25 May 2011
1 answer
137 views
How to set a static size to my Resources  in Scheduler.
see pic.
Ivan Todorov
Telerik team
 answered on 25 May 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
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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?