Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views
I am decoratively creating a Spline chart and need to change the line colors:

<telerik:RadChart
           ID="RadChartModelingZones"
           runat="server"
           DataSourceID="SqlDataSourceModelingZones"
           DefaultType="Spline"
           Skin="Gray"
           ChartTitle-TextBlock-Text="Merit">
           <Appearance Corners="Round, Round, Round, Round, 7">
               <FillStyle FillType="ComplexGradient">
                   <FillSettings GradientMode="Horizontal">
                       <ComplexGradient>
                           <telerik:GradientElement Color="236, 236, 236" />
                           <telerik:GradientElement Color="248, 248, 248" Position="0.5" />
                           <telerik:GradientElement Color="236, 236, 236" Position="1" />
                       </ComplexGradient>
                   </FillSettings>
               </FillStyle>
               <Border Color="130, 130, 130" />
           </Appearance>
           <Series>
               <telerik:ChartSeries Name="Series 1" Type="Spline">
                   <Appearance>
                       <FillStyle MainColor="164, 164, 164">
                       </FillStyle>
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
               </telerik:ChartSeries>
               <telerik:ChartSeries Name="Series 2" Type="Spline">
                   <Appearance>
                       <FillStyle MainColor="108, 108, 108">
                       </FillStyle>
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
               </telerik:ChartSeries>
           </Series>
           <Legend>
               <Appearance Dimensions-Margins="17.6%, 3%, 1px, 1px"
                           Dimensions-Paddings="2px, 8px, 6px, 3px" Position-AlignedPosition="TopRight">
                   <ItemMarkerAppearance Figure="Square">
                       <Border Width="0" />
                   </ItemMarkerAppearance>
                   <FillStyle MainColor="">
                   </FillStyle>
                   <Border Width="0" />
               </Appearance>
           </Legend>
           <PlotArea>
               <XAxis>
                   <Appearance Color="182, 182, 182" MajorTick-Color="216, 216, 216">
                       <MajorGridLines Color="216, 216, 216" PenStyle="Solid" />
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
                   <AxisLabel>
                       <TextBlock>
                           <Appearance TextProperties-Color="51, 51, 51">
                           </Appearance>
                       </TextBlock>
                   </AxisLabel>
               </XAxis>
               <YAxis>
                   <Appearance Color="182, 182, 182" MajorTick-Color="216, 216, 216"
                               MinorTick-Color="223, 223, 223">
                       <MajorGridLines Color="216, 216, 216" />
                       <MinorGridLines Color="223, 223, 223" />
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
                   <AxisLabel>
                       <TextBlock>
                           <Appearance TextProperties-Color="51, 51, 51">
                           </Appearance>
                       </TextBlock>
                   </AxisLabel>
               </YAxis>
               <Appearance>
                   <FillStyle FillType="Solid" MainColor="White">
                   </FillStyle>
                   <Border Color="182, 182, 182" />
               </Appearance>
           </PlotArea>
           <ChartTitle>
               <Appearance>
                   <FillStyle MainColor="">
                   </FillStyle>
               </Appearance>
               <TextBlock>
                   <Appearance TextProperties-Color="102, 102, 102"
                               TextProperties-Font="Arial, 18pt">
                   </Appearance>
               </TextBlock>
           </ChartTitle>
       </telerik:RadChart>
 
Here is the DataSource:

<asp:SqlDataSource
    ID="SqlDataSourceModelingZones"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:...%>"
    SelectCommand="GetMeritModelingZones"
    SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter
            ControlID="RadSlider"
            DefaultValue="0.00"
            Name="Merit"
            PropertyName="SelectedValue"
            Type="Decimal" />
    </SelectParameters>
</asp:SqlDataSource>

I would prefer to keep all markup in aspx as opposed to changing the line colors in the code behind if that is possible.

The attached shows the chart w/ the default colors and cannot seem to change.

Thanks,

Steve

Evgenia
Telerik team
 answered on 28 Aug 2012
4 answers
427 views
Hi
My problem with ExportToPDF is that columns is being overlapped when not wide enough to display text.
So I'm trying to use "word-wrap:break-word". It works fine at grid control and IE displays all of text.
But It doesn't work if it is exported to a PDF. It doesn't break word at all in pdf output.
In PDF output, is there any way to display all text by extending height of row?
I don't want text to be truncated.

Thanks 
Daniel
Telerik team
 answered on 28 Aug 2012
4 answers
451 views
Hello,

I want to add ComboBox to RAD Grid header columns. For e.g. I have many columns in RAD Grid and each column header will have a dropdown with items. On selecting the drop down the grid column get populated with the data related to the field column from database. Please see the attached image to get more idea on my request.

Is this possible? Please advise.

Thank you,
Asok
Asok
Top achievements
Rank 1
 answered on 28 Aug 2012
10 answers
247 views
HI

i have linkbutton with commandargments to find the selectd value  inside a Gridview which on click navigates to new page with selectd value  in Quey String whic is used in landing page to show some data,this GridView  is ajaxified using radajaxmanger.
 
we shows 100 rows grouping 10rows are a group,

in page load if we click 14th row i..e  4th row in second group its giving correct values in command arguments
after a search im showing only rows of 2nd group i..e 11 to 20 rows
now if i clik the 14th row in  command arguments its giving 4th row of  first group

two days back only we have implemented  radajaxmanger,from then we are facing this issue

Please help me




Maria Ilieva
Telerik team
 answered on 28 Aug 2012
1 answer
99 views
Dear Sir/Madam


I'm Maha From India.


Advance Thank you for Helping me


I have RadGrid1(using Mutiselect checkbox option) in my project


Problem : Label Text inside CommandItemTemplate not visible in after i click Delete(LinkButton1)
==================================================================
Inside CommandItemTemplate I have Label(lblmsg) to display some message to user for validation and DB Deleted Message


If user clicking LinkButton(LinkButton1) without seelcting any checkbox means I write validation 


That validation message will display on this lblmsg correctly


But if user select the check box and then click Delete means I want to show Confirmation message to user


Message format : Customer ID1,Customer ID2 deleted from DB succesfully


The above message will not visible in RadGrid


But If i debug means Thats Label Text Properly assigned using C#(RadGrid1_ItemCommand)


Note:
====
After execution of RadGrid1_ItemCommand() ->RadGrid1_NeedDataSource() method invoked Automatically


So My Doubt is  whether RadGrid Reassign my Label Text as Empty.


Becoz in Browser View Source <span id="RadGrid1_ctl00_ctl03_ctl01_lblmsg"></span>


Inside span my Text is not there


Code.aspx
=========
Ajax Settings
==========================================================================================
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                   
               <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    
                        <UpdatedControls>
                           
                            <telerik:AjaxUpdatedControl  ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            
                            
                        </UpdatedControls>
                     
                 </telerik:AjaxSetting>
                    
                     
                    </AjaxSettings>
            </telerik:RadAjaxManager>
             
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Default" runat="server"></telerik:RadAjaxLoadingPanel>
    
Grid Code
==========================================================================================
 <telerik:RadGrid ID="RadGrid1"  Width="100%" AllowFilteringByColumn="True"
            PageSize="12" ShowFooter="false" AllowPaging="True" runat="server"
            AutoGenerateColumns="False" GridLines="None" ShowStatusBar="false" 
            onneeddatasource="RadGrid1_NeedDataSource" AllowSorting="true" AllowMultiRowSelection="true" 
                ShowGroupPanel="false" onitemcommand="RadGrid1_ItemCommand">
              <GroupingSettings CaseSensitive="false" />
   
           <MasterTableView CommandItemDisplay="Bottom" Width="100%" AllowFilteringByColumn="true" GroupsDefaultExpanded="false">
<CommandItemTemplate>
<div style="padding-left:8px;">
<asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected Jobs?')"
runat="server" Font-Size="13px" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Delete.gif" />Delete</asp:LinkButton>&nbsp;&nbsp;
<asp:Label ID="lblmsg" runat="server"></asp:Label>
</div>
</CommandItemTemplate>


                <Columns>
----
</Columns>


</MasterTableView>
            
   <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
 </telerik:RadGrid>
==========================================================================================
code.cs(C#)
======
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "DeleteSelected")
            {
                GridCommandItem commandItem = e.Item as GridCommandItem;


                Label lbl = commandItem.FindControl("lblmsg") as Label;
                lbl.Text = "";
                if (RadGrid1.SelectedIndexes.Count == 0)
                {
                    lbl.Text = "Not Selected any Customer IDs";
                    lbl.ForeColor = System.Drawing.Color.Red;
                    return;
                }


                System.Text.StringBuilder sbJobIds = new System.Text.StringBuilder();




                foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
                {
                    if (item.Selected)
                    {
                        string customerid = item["CusID"].Text;
                        if (customerid != null && customerid.Trim().Length > 0)
                            sbJobIds.Append(customerid + ",");
                    }
                }
               
//DB Coding


-----
//
            
  lbl.Text = sbJobIds.ToString()+"deleted from DB succesfully";  //This Message will not be visible to user
  lbl.ForeColor = System.Drawing.Color.Green;
               
               
               
            }


        }


==========================================================================================


Please advice me whats can i do?


Awaiting for your favourable reply




With Regards,
Maha
Maria Ilieva
Telerik team
 answered on 28 Aug 2012
1 answer
95 views
I am trying to use the RadTimePicker on several web pages.  I've kept it pretty simple at first and put the following telerik-specific code on a page:

first, at the top of the page is this:

%@ Control Language="c#" AutoEventWireup="false" Codebehind="service_category_admin.ascx.cs" Inherits="vtvn_service.service_category_admin" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %>

then in the body is this:
<telerik:RadTimePicker ID="start_time_picker" visible="true" ZIndex="30001" runat="server">
</telerik:RadTimePicker>

One one page, it works...sometimes.  That is, if I click on the clock icon, a popup with times to select from appears.

On a couple other pages that I put the code on, clicking the clock icon does nothing, except generate the following javascript errror:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 23 Aug 2012 18:28:49 UTC

Message: Object doesn't support this property or method
Line: 179
Char: 3
Code: 0
URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2012.1.411/Calendar/RadCalendarCommonScript.js

I am running version 2012.1.411.40 of the tererik.web.ui dll.

Any and all help will be appreciated as I am pretty much dead in the water right now.
Maria Ilieva
Telerik team
 answered on 28 Aug 2012
1 answer
84 views
Hi,

We have a grid that contains nested rows three levels deep, in the following way:
1. Status
2.    -- Action
3.        -- Role

To add a Role, there is an 'Add Row' button, which contains a dropdown of Roles on a GridDropDownColumn. There is an Insert button and a Close button. This functionality works fine to add a Role, but sometimes the Role name is blank in the row below. It seems to only happen after deleting/inserting roles, particularly if a higher up row is expanded as well.

I'm unable to reproduce the exact steps as it is intermittent, but I was wondering if there are any known issues with nested rows in grids, or if you have any suggestions in how to establish the cause of this?


Regards,
Graeme
Antonio Stoilkov
Telerik team
 answered on 28 Aug 2012
1 answer
108 views

Hi,

I have a radgrid with edit mode = custom edit form in asp.net page.  There are several asp textbox in the FormTemplate. 
I follow the sample in http://www.telerik.com/help/aspnet-ajax/grid-set-focus-on-textboxes-in-edit-control.html to set one of the textbox focus when itemcreated.  However, I found that this the script did not work when I set AllowKeyboardNavigation = true in client setting.  If I set AllowKeyboardNavigation  = false, the textbox can get the foucs when I edit the row.
Below is my coding for the FormTemplate and ClientSetting

<EditFormSettings EditFormType="Template" >  
                   <EditColumn UniqueName="EditColumn" AutoPostBackOnFilter="true"></EditColumn>                     
                   <FormTemplate>
                       <asp:Table ID="EditTable" runat="server" cellspacing="0" cellpadding="0" BorderStyle=None>
                           <asp:TableRow>
                               <asp:TableCell>
                                   <asp:Label ID="lblOrgCode" runat="server" Text="Org. Code" ></asp:Label>
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtOrgCode" Text='<%# Bind("OrgCode") %>' runat="server" CssClass="uppercase" TabIndex="1" Readonly='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"false","true")%>' ></asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell></asp:TableCell>
                               <asp:TableCell>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgCode" ForeColor="Red"
                                       ErrorMessage="Organization code can not be empty!">
                                   </asp:RequiredFieldValidator>
                                   <asp:CustomValidator ID="CustomValidator1" runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgCode" ForeColor="Red" OnServerValidate="OrgCode_ServerValidate"
                                       ErrorMessage="Org. code must be less than 100 characters">
                                   </asp:CustomValidator>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   <asp:Label ID="lblOrgName" runat="server" Text="Org. Name" ></asp:Label>
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtOrgName" Text='<%# Bind("OrgName") %>' runat="server" TabIndex="2" ></asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell></asp:TableCell>
                               <asp:TableCell>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgName" ForeColor="Red"
                                       ErrorMessage="Organization name can not be empty!">
                                   </asp:RequiredFieldValidator>
                                   <asp:CustomValidator ID="CustomValidator2" runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgName" ForeColor="Red" OnServerValidate="OrgName_ServerValidate"
                                       ErrorMessage="Org. name must be less than 100 characters">
                                   </asp:CustomValidator>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   Creation Date
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtCreationDate" Text='<%# Bind("CreationDate") %>' runat="server" ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell>
                                     By   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtCreationUser" runat="server" Text='<%# Bind("CreationUser") %>' ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   Last Change Date   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtLastChangeDate" Text='<%# Bind("LastChangeDate") %>' runat="server" ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell>
                                     By   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtLastChangeUser" runat="server" Text='<%# Bind("LastChangeUser") %>' ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                           </asp:TableRow>
                       </asp:Table>
                       <asp:Table runat="server">
                           <asp:TableRow>
                               <asp:TableCell HorizontalAlign=Left
                                   <asp:Button ID="Button1" Text='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"Insert","Update")%>' runat="server" CommandName='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"PerformInsert","Update")%>' TabIndex="3"> </asp:Button
                                   <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" TabIndex="4"></asp:Button>
                               </asp:TableCell>
                           </asp:TableRow>
                       </asp:Table>
                   </FormTemplate>
               </EditFormSettings>
           </MasterTableView>
           <ClientSettings ReorderColumnsOnClient="True"  AllowColumnsReorder="True" AllowKeyboardNavigation="true" >
               <Selecting AllowRowSelect="True"></Selecting>
               <KeyboardNavigationSettings AllowSubmitOnEnter="true" EnableKeyboardShortcuts="true" AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow" />                  
           </ClientSettings>

Below is my coding in setting the textbox focus on ItemCreated event.

If e.Item.IsInEditMode Then
                If TypeOf (e.Item) Is GridEditFormInsertItem Then
                    ControlToFocus = DirectCast(DirectCast(e.Item, GridEditableItem).FindControl("txtOrgCode"), TextBox)
                Else
                    ' Dim lGridEditableItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
                    ControlToFocus = DirectCast(DirectCast(e.Item, GridEditableItem).FindControl("txtOrgName"), TextBox)
                End If
            End If
 
            If Not ControlToFocus Is Nothing Then
                Dim script As String = [String].Format("$get('{0}').focus(); $get('{0}').select();", ControlToFocus.ClientID)
                RadScriptManager.RegisterStartupScript(Page, GetType(Page), "EditFocusScript", script, True)
 
            End If

Thanks!

Vasil
Telerik team
 answered on 28 Aug 2012
2 answers
79 views

Hi,

We are using the Real Font Sizes for the RadEditor.
When I create new line, RadEditor does not inherit font size to the line.

1. All clear
2. Input any string and set any font size.
3. move cursor to end of the string.
4. Input enter key.

Result:
 <p><span style="font-size: 22px;">testtesttest</span></p>
 <p>&nbsp;</p>

Expected Result:
 <p><span style="font-size: 22px;">testtesttest</span></p>
 <p><span style="font-size: 22px;">&nbsp;</span></p>

If I use the Default Font Size instead of the Real Font Size, the behavior is expected.

Please tell me any workarounds.
Thanks,
Akinori

Rumen
Telerik team
 answered on 28 Aug 2012
1 answer
107 views
I wonder how it is possible to make a filter in real time on a RadGridView

I do not know what event by my textBox to perform so that the filter will

update my RadGrid through just the characters that I'm typing

no more need to go on the bench ... research in itself is showing the list q grid.

- Code that updates my RadGrid -

private void BindToGridAllUsers (string domainIdentity)
         {
             / / Get list of domain users
             List <AllUsersr> listAllUser = (new viewGroups ()). GetAllUser (domainIdentity);

             / / Update the list of users of the grid
             radGridUsers.DataSource = listAllUser;
             radGridUsers.DataBind ();
         }

my code this variable "listAllUser" this taking the existing users and putting in my RadGridView.

I appreciate the help.

Information: Database SQL Server, Visual C # 2010 Ultimate, Telerik components
Eyup
Telerik team
 answered on 28 Aug 2012
Narrow your results
Selected tags
Tags
+? 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?