Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
471 views

I have a datepicker in grid edit form for passport issue date and expiry date.If database has null date feilds then grid is displaying the mindate. but we can't give min date for passport because it is  not mandatory. Grid should not display any value if the value in database is null. please help me. 
I have attached Screenshot and pasting my code here. there is no .cs code.. its only in aspx.
Thankyou. 


<%@ Page Language="C#" MasterPageFile="~/sample.Master" AutoEventWireup="true" CodeBehind="EmployeeList.aspx.cs"
    Inherits="MenloHRMS.Views.EmployeeList" %>
  
<%--<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls"
    TagPrefix="BDP" %>--%>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <br />
    <br />
    <style type="text/css">
        .MyImageButton
        {
            cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
    </style>
  
    <script type="text/javascript" language="javascript">
     function AllowNumeric()
      {
        // Get the ASCII value of the key that the user entered
       var key =window.event.keyCode;
  
        // Verify if the key entered was a numeric character (0-9) or a decimal (.)
        if ( (key > 47 && key < 58) || key == 46 )
            // If it was, then allow the entry to continue
            return;
        else
            // If it was not, then dispose the key and continue with entry
           window.event.returnValue = null
    }
    </script>
  
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgEmployeeLst">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgEmployeeLst" />
                    <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
      
    <telerik:RadGrid ID="rgEmployeeLst" runat="server" GridLines="None" Skin="Black"  
        DataSourceID="dsEmployees" AllowAutomaticDeletes="True" AllowSorting="false" AllowAutomaticUpdates="True"
        AutoGenerateColumns="False">
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
        <MasterTableView DataSourceID="dsEmployees" AllowPaging="true" PageSize="10" DataKeyNames="EmpId">
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table cellspacing="2" cellpadding="1" width="100%" border="0">
                        <tr>
                            <td class="lblCaption" align="right">
                                FirstName<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox Width="200px" ID="txtFName" runat="server" Text='<%# Bind("FName") %>'></asp:TextBox>
                            </td>
                            <td class="lblCaption" align="right">
                                Last Name<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtLName" runat="server" Width="200px" MaxLength="30" Text='<%# Bind("LName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Role<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbRole" Width="205px" runat="server" DataSourceID="DsRoles"
                                    SelectedValue='<%# Bind("RoleID") %>' DataTextField="Role" DataValueField="RoleId">
                                </telerik:RadComboBox>
                                  
                            </td>
                            <td align="right" class="lblCaption">
                                Department<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbDept" Width="205px" runat="server" DataSourceID="DSDepts"
                                    DataTextField="DeptName" DataValueField="DeptID" SelectedValue='<%# Bind("DeptID") %>'>
                                </telerik:RadComboBox>
                                  
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Date Of Birth<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrDOB" runat="server" Width="200px"  SelectedDate='<%# Bind("DOB") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrDOB" runat="server" Width="230px" ValidationGroup="Validate"
                                    ShowPopupOnFocus="True" SelectedDate='<%# Bind("DOB") %>'>
                                    <Calendar ID="Calendar1" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput1" DateFormat="M/d/yyyy" runat="server">
                                    </DateInput>
                                </telerik:RadDatePicker>
                                <asp:RequiredFieldValidator ID="RFVDOB" runat="server" ControlToValidate="dtpkrDOB" ErrorMessage="*" ToolTip="Enter DateOfBirth"></asp:RequiredFieldValidator>
                            </td>
                              
                            <td align="right" class="lblCaption">
                                Date Of Joining<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrDOJ" runat="server" Width="200px"  SelectedDate='<%# Bind("DOJ") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrDOJ" runat="server" Width="230px" ValidationGroup="Validate"
                                    ShowPopupOnFocus="True" SelectedDate='<%# Bind("DOJ") %>'>
                                    <Calendar ID="Calendar2" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput2" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                                 <asp:RequiredFieldValidator ID="RFVDOJ" runat="server" ControlToValidate="dtpkrDOJ" ErrorMessage="*" ToolTip="Enter DateOfJoining"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Address<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress" runat="server" Width="200px" TextMode="MultiLine" Text='<%# Bind("Address") %>'></asp:TextBox>
                            </td>
                            <td align="right" class="lblCaption">
                                Phone(Res):
                            </td>
                            <td>
                                <asp:TextBox ID="txtResi" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("Phone_Resi") %>'
                                    onkeypress="AllowNumeric()">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                Phone(Mobile)<span class="MandatoryField">*</span>:
                            </td>
                            <td>
                                <asp:TextBox ID="txtMobile" runat="server" Width="200px" MaxLength="10" Text='<%# Bind("Phone_Mobile") %>'
                                    onkeypress="AllowNumeric()">
                                </asp:TextBox>
                            </td>
                            <td align="right" class="lblCaption">
                                PANCard:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtPanCard" runat="server" Width="200px" Text='<%# Bind("PAN") %>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lblCaption">
                                PassportNo:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtPassport" runat="server" Width="200px" Text='<%# Bind("PassportNo") %>'>
                                </telerik:RadTextBox>
                            </td>
                            <td class="lblCaption" align="right">
                                Passport Issue Date:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrPasprtIssue"  runat="server" Width="200px" SelectedDate='<%# Bind("Passport_IssuedOn") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrPasprtIssue" runat="server" Width="230px" ShowPopupOnFocus="True"
                                    SelectedDate='<%#DataBinder.Eval(Container.DataItem,"Passport_IssuedOn") %>'>
                                    <Calendar ID="Calendar3" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput3" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                            </td>
                        </tr>
                        <tr>
                            <td class="lblCaption" align="right">
                                Passport Expiry Date:
                            </td>
                            <td>
                                <%--<BDP:BasicDatePicker ID="dtpkrPasprtExp" runat="server"  Width="200px" SelectedDate='<%# Bind("Passport_Exp") %>'>
                                </BDP:BasicDatePicker>--%>
                                <telerik:RadDatePicker ID="dtpkrPasprtExp" runat="server" Width="230px" ShowPopupOnFocus="True"
                                    SelectedDate='<%#DataBinder.Eval(Container.DataItem,"Passport_Exp") %>'>
                                    <Calendar ID="Calendar4" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
                                        ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                    <DateInput ID="DateInput4" DateFormat="M/d/yyyy" runat="server" DisplayDateFormat="M/d/yyyy">
                                    </DateInput>
                                </telerik:RadDatePicker>
                            </td>
                            <td class="lblCaption" align="right">
                                Email:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtEmail" runat="server" Width="200px" Text='<%# Bind("EmailId") %>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="4">
                                <table>
                                    <tr>
                                        <td>
                                            <telerik:RadButton ID="btnUpdate"  Text="Update" ValidationGroup="Validate" runat="server"
                                                Skin="Black" CommandName="Update" OnClientClicked="">
                                            </telerik:RadButton>
                                            <telerik:RadButton ID="btnCancel" Text="Cancel" runat="server" Skin="Black" CommandName="Cancel">
                                            </telerik:RadButton>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
               <CommandItemSettings ShowExportToExcelButton="true" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../../Images/Edit_Icon.jpeg"
                    UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="EmpId" FilterControlAltText="Filter EmpId column"
                    HeaderText="EmpId" SortExpression="EmpId" UniqueName="EmpId" Visible="false"
                    ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FName" FilterControlAltText="Filter FName column"
                    HeaderText="First Name" SortExpression="FName" UniqueName="FName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LName" FilterControlAltText="Filter LName column"
                    HeaderText="Last Name" SortExpression="LName" UniqueName="LName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Role" FilterControlAltText="Filter Role column"
                    HeaderText="Role" SortExpression="Role" UniqueName="Role">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Department" FilterControlAltText="Filter Department column"
                    HeaderText="Department" SortExpression="Department" UniqueName="Department">
                </telerik:GridBoundColumn>
                
                <telerik:GridDateTimeColumn DataField="DOB" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                    FilterControlAltText="Filter DOB column" HeaderText="DOB" SortExpression="DOB"
                    UniqueName="DOB">
                </telerik:GridDateTimeColumn>
                 
                <telerik:GridDateTimeColumn DataField="DOJ" FilterControlAltText="Filter DOJ column"
                    DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}" HeaderText="DOJ" SortExpression="DOJ"
                    UniqueName="DOJ">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Address column"
                    HeaderText="Address" SortExpression="Address" UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" FilterControlAltText="Filter EmailId column"
                    HeaderText="EmailId" SortExpression="EmailId" UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Phone_Resi" FilterControlAltText="Filter Phone_Resi column"
                    HeaderText="Residence" SortExpression="Phone_Resi" UniqueName="Phone_Resi">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Phone_Mobile" FilterControlAltText="Filter Phone_Mobile column"
                    HeaderText="Mobile" SortExpression="Phone_Mobile" UniqueName="Phone_Mobile">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PAN" FilterControlAltText="Filter PAN column"
                    HeaderText="PAN" SortExpression="PAN" UniqueName="PAN">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PassportNo" FilterControlAltText="Filter PassportNo column"
                    HeaderText="PassportNo" SortExpression="PassportNo" UniqueName="PassportNo">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="Passport_IssuedOn" DataType="System.DateTime" HtmlEncode="false"
                    DataFormatString="{0:MM/dd/yyyy}" FilterControlAltText="Filter Passport_IssuedOn column"
                    HeaderText="Passport IssuedOn" SortExpression="Passport_IssuedOn" UniqueName="Passport_IssuedOn">
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="Passport_Exp" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                    FilterControlAltText="Filter Passport_Exp column" HeaderText="Passport Expiry" SortExpression="Passport_Exp"
                    UniqueName="Passport_Exp" HtmlEncode="false">
                </telerik:GridDateTimeColumn>
                
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <PagerStyle Mode="NumericPages" />
    </telerik:RadGrid>
    <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting1" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter FirstName">
            <TargetControls>
                <telerik:TargetInput ControlID="txtFName" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting2" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter LastName" Validation-ValidationGroup="Validate">
            <TargetControls>
                <telerik:TargetInput ControlID="txtLName" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting3" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter Role">
            <TargetControls>
                <telerik:TargetInput ControlID="cmbRole" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting6" Validation-IsRequired="true"
            EmptyMessage="Enter Value" ErrorMessage="Enter Department">
            <TargetControls>
                <telerik:TargetInput ControlID="cmbDept" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:DateInputSetting BehaviorID="datePkrSettings1" DisplayDateFormat="M/d/yyyy"
            MinDate="1950-01-01" MaxDate="01-01-1999" Validation-IsRequired="true" ErrorMessage="Enter Valid Date">
            <TargetControls>
                <telerik:TargetInput ControlID="dtpkrDOB" Enabled="true" />
            </TargetControls>
        </telerik:DateInputSetting>
        <telerik:DateInputSetting BehaviorID="datePkrSettings2" DisplayDateFormat="M/d/yyyy"
            MinDate="1998-01-01" Validation-IsRequired="true" ErrorMessage="Enter Valid Date">
            <TargetControls>
                <telerik:TargetInput ControlID="dtpkrDOJ" Enabled="true" />
            </TargetControls>
        </telerik:DateInputSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting4" Validation-IsRequired="true"
            ErrorMessage="Enter Address">
            <TargetControls>
                <telerik:TargetInput ControlID="txtAddress" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting5" Validation-IsRequired="true"
            ErrorMessage="Enter MobileNo">
            <TargetControls>
                <telerik:TargetInput ControlID="txtMobile" Enabled="true" />
            </TargetControls>
        </telerik:TextBoxSetting>
    </telerik:RadInputManager>
    <asp:SqlDataSource ID="test" runat="server" ConnectionString="<%$ ConnectionStrings:MenloConnection %>"
    SelectCommand="select * from Employees emp join roles r on emp.role=r.roleid join departments d on emp.department=d.deptId" UpdateCommand="UPDATE [Employees] SET [FName] = @FName, [LName] = @LName, [Role] = @RoleID, [Department] = @DeptID,[DOB]=@DOB, [DOJ] = @DOJ, [Address] = @Address, [EmailId] = @EmailId,[Phone_Resi] = @Phone_Resi, [Phone_Mobile] = @Phone_Mobile,[PAN]=@PAN,[PassportNo]=@PassportNo,[Passport_Exp]=@Passport_Exp,[Passport_IssuedOn]=@Passport_IssuedOn WHERE [EmpId] = @EmpId">
                                      
                                    <UpdateParameters>
                                        <asp:Parameter Name="FName" Type="String" />
                                        <asp:Parameter Name="LName" Type="String" />
                                        <asp:Parameter Name="RoleID" Type="Int32" />
                                        <asp:Parameter Name="DeptID" Type="Int32" />
                                        <asp:Parameter Name="DOB" Type="DateTime" />
                                        <asp:Parameter Name="DOJ" Type="DateTime" />
                                        <asp:Parameter Name="Address" Type="String" />
                                        <asp:Parameter Name="EmailId" Type="String" />
                                        <asp:Parameter Name="Phone_Resi" Type="String" />
                                        <asp:Parameter Name="Phone_Mobile" Type="String" />
                                        <asp:Parameter Name="PAN" Type="String" />
                                        <asp:Parameter Name="PassportNo" Type="String" />
                                        <asp:Parameter Name="Passport_Exp" Type="DateTime" />
                                        <asp:Parameter Name="Passport_IssuedOn" Type="DateTime" />
                                        <asp:Parameter Name="EmpId" Type="Int32" />
                                    </UpdateParameters>
                                </asp:SqlDataSource>
    <asp:ObjectDataSource ID="dsEmployees" runat="server" SelectMethod="GetEmployees1"
        TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee" UpdateMethod="UpdateEmployeeDetails"
        DeleteMethod="DeleteEmployee">
          
        <UpdateParameters>
            <asp:Parameter Name="EmpId" Type="Int32" />
            <asp:Parameter Name="FName" Type="String" />
            <asp:Parameter Name="LName" Type="String" />
            <asp:Parameter Name="RoleID" Type="Int32" />
            <asp:Parameter Name="DeptID" Type="Int32" />
            <asp:Parameter Name="DOB" Type="DateTime" />
            <asp:Parameter Name="DOJ" Type="DateTime" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="EmailId" Type="String" />
            <asp:Parameter Name="Phone_Resi" Type="String" />
            <asp:Parameter Name="Phone_Mobile" Type="String" />
            <asp:Parameter Name="PAN" Type="String" />
            <asp:Parameter Name="PassportNo" Type="String" />
            <asp:Parameter Name="Passport_Exp" Type="DateTime" />
            <asp:Parameter Name="Passport_IssuedOn" Type="DateTime" />
        </UpdateParameters>
        <DeleteParameters>
            <asp:Parameter Name="EmpId" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="DSDepts" runat="server" SelectMethod="GetDepts" TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="DsRoles" runat="server" SelectMethod="GetRoles" TypeName="MenloHRMS.Core.BLL.PageData.Employee.clsEmployee">
    </asp:ObjectDataSource>
</asp:Content>
Iana Tsolova
Telerik team
 answered on 20 Apr 2011
3 answers
202 views
Dear all,
I'm currently our portal inside my company usually the user upload files. everything is working fine.

i tried to link the location of the files using gridview, the problem the link location within our network like this "\\portal\TS\RFP\8971\Sales\RFQ.pdf"
one the user click on the file using IE8.0  the page is response as "Internet Explorer cannot display the webpage" once i refresh the file is open and work fine while in FireFox it's not working at all.

how i can solve this issue

thanks for your support in advanced

Maria Ilieva
Telerik team
 answered on 20 Apr 2011
1 answer
74 views
Hello,

When i keep the chart.skin ="Default" then it generates chart with very nice colors and looks like 3D. Plz see attached image. I would like to generate the same runtime using code behind. Which are properties need to set to achieve same bar colors ?

Is there any KB dock where I can get all the other nice pattens that I can generate ?
Missing User
 answered on 20 Apr 2011
4 answers
129 views
How can I recreate the following formatting within my VB?

            <Appearance> 
                <FillStyle FillType="ComplexGradient"
                    <FillSettings> 
                        <ComplexGradient> 
                            <telerik:GradientElement Color="254, 122, 218" /> 
                            <telerik:GradientElement Color="244, 80, 198" Position="0.5" /> 
                            <telerik:GradientElement Color="205, 46, 153" Position="1" /> 
                        </ComplexGradient> 
                    </FillSettings> 
                </FillStyle> 
                <TextAppearance TextProperties-Color="51, 51, 51"
                </TextAppearance> 
                <Border Color="174, 12, 111" /> 
            </Appearance> 
 

This is what I've tried with very limited success:

            Dim chartSeries As New Telerik.Charting.ChartSeries() 
            chartSeries.Name = "BUDGET" 
            chartSeries.Type = Telerik.Charting.ChartSeriesType.Bar 
            RadChart1.Series.Add(chartSeries) 
            RadChart1.Series(2).DataYColumn = "budget" 
            'RadChart1.Series(2).Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.ComplexGradient 
            'RadChart1.Series(2).Appearance.FillStyle.FillSettings.ComplexGradient.Item(0).Color = Drawing.Color.Tomato 
            'RadChart1.Series(2).Appearance.FillStyle.FillSettings.ComplexGradient.Item(1).Color = Drawing.Color.Red 
            ' RadChart1.Series(2).Appearance.FillStyle.FillSettings.ComplexGradient.Item(0).Position = 0.5 
            'RadChart1.Series(2).Appearance.FillStyle.FillSettings.ComplexGradient.Item(1).Position = 1 
            RadChart1.Series(2).Appearance.FillStyle.MainColor = Drawing.Color.Tomato 
            RadChart1.Series(2).Appearance.FillStyle.SecondColor = Drawing.Color.Red 
            RadChart1.Series(2).Appearance.TextAppearance.TextProperties.Color = Drawing.Color.Black 
            RadChart1.Series(2).Appearance.Border.Color = Drawing.Color.Tomato 
 


Thanks in advance,
Ryan
Missing User
 answered on 20 Apr 2011
3 answers
228 views
I'm attempting to set a bar in a chart to gradient color using the following code, but something is missing.  What else do I need?

chartSeries.Type = ChartSeriesType.Bar

chartSeries.Appearance.FillStyle.MainColor = Drawing.Color.Beige

chartSeries.Appearance.FillStyle.SecondColor = Drawing.Color.Aqua

chartSeries.Appearance.FillStyle.FillType = Styles.FillType.ComplexGradient

I get the following error message...

ColorBlend object that was set is not valid.Array of colors and positions must contain at least two elements. ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.

Missing User
 answered on 20 Apr 2011
2 answers
125 views
Hi All,

I want to show grid pager if the row count less then the page count. My customer want to know search results count every time. How can i show pager side every time.

Regards .
Ahmet HOSO
Top achievements
Rank 1
 answered on 20 Apr 2011
3 answers
108 views
Hello Telerik Team,

Need an urgent help from your side.

We have grid having textbox on it. Textbox is added to grid column. There is link button beside the textbox. On click of link button one child window will open. Child window is having grid with one column. On double click of the child window grid, child window need to close and parent window grid text box, should be reflected with selected value of child window . We are able to get the value from child window to parent and close the child window. But parent window grid textbox is not reflecting the selected value from child window. Even though value is seting on ajaxrequest, it not getting reflect in the textbox.

Thanks in advance.

Regards,
Sudhakar
sudhakar
Top achievements
Rank 1
 answered on 20 Apr 2011
1 answer
189 views

I have a 2 level heirchy in radgrid.
When I select the Second Detail Table i want to dynamically render content in the

 

 

NestedViewTemplate.

What is the best way or event Iam using ItemCommand:

 

 

<

 

 

telerik:RadGrid ID="RadGridTariffSericeLevel" runat="server" DataSourceID="ObjectDataSourceTariffLanesByServiceLevel"

 

 

 

 

 

 

 

 

 

 

EnableLinqExpressions="false" Width="950px" Skin="Vista" GridLines="Horizontal"

 

 

 

 

AllowPaging="True" AutoGenerateColumns="false" Hei

 

 

 

 

 

 

 

 

 

 

OnItemCreated="RadGridTariffSericeLevel_ItemCreated"

 

 

 

 

OnItemCommand="RadGridTariffSericeLevel_ItemCommand"

 

 

 

 

onitemdatabound="RadGridTariffSericeLevel_ItemDataBound"

 

 

 

 

ondatabound="RadGridTariffSericeLevel_DataBound"

 

 

 

 

onselectedindexchanged="RadGridTariffSericeLevel_SelectedIndexChanged"

 

 

 

 

onneeddatasource="RadGridTariffSericeLevel_NeedDataSource" >

 

 

 

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

 

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

 

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

 

 

 

<MasterTableView DataKeyNames="TariffDataID, ServiceLevelID" ShowFooter="true" DataSourceID="ObjectDataSourceTariffLanesByServiceLevel"

 

 

 

 

 

 

 

 

 

 

ItemStyle-BackColor="#eff4f8" AlternatingItemStyle-BackColor="#eff4f8" FooterStyle-ForeColor="Red" Font-Size="Large">

 

 

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ServiceLevelID" HeaderText="Service" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Lanes" HeaderText="Lanes" HeaderStyle-Width="75px"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:n0}" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ShipmentsPerMonth" HeaderText="Pros" HeaderStyle-Width="75px"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:n0}" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TotalCost" HeaderText="Total Cost" DataFormatString="{0:c2}"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:c2}" />

 

 

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

 

 

 

<telerik:GridTableView runat="server" Name="GridTableViewOrigin" DataSourceID="ObjectDataSourceTariffLanesByServiceLevelOrigin"

 

 

 

 

 

 

 

 

 

 

DataKeyNames="TariffDataID, ServiceLevelID, OriginServicePointID" AutoGenerateColumns="false" Width="100%" HierarchyLoadMode="ServerBind">

 

 

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="OriginServicePointID" HeaderText="Origin" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Lanes" HeaderText="Lanes" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ShipmentsPerMonth" HeaderText="Pros" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TotalCost" HeaderText="Total Cost" DataFormatString="{0:c2}" />

 

 

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="OriginServicePointID" MasterKeyField="ServiceLevelID" />

 

 

 

 

 

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

 

 

 

 

 

<NestedViewTemplate>

 

 

 

 

 

 

 

 

 

 

<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

 

 

 

 

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Clicked" CommandName="Button1" />

 

 

 

 

 

 

 

 

 

 

</NestedViewTemplate>

 

 

 

 

 

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

protected void RadGridTariffSericeLevel_ItemCommand(object source, GridCommandEventArgs e)

 

 

{

 

 

 

if (e.CommandName == "ExpandCollapse" && e.Item.OwnerTableView.Name == "GridTableViewOrigin")

 

 

{

 

 

 

GridDataItem OriginItem = (GridDataItem)e.Item;

 

 

 

 

GridNestedViewItem NestedViewItem = (GridNestedViewItem)OriginItem.ChildItem;

 

 

 

 

if (NestedViewItem != null)

 

 

{

 

 

 

PlaceHolder PlaceHolder1 = (PlaceHolder)NestedViewItem.FindControl("PlaceHolder1");

 

 

PlaceHolder1.Controls.Add(GetTable());

 

 

 

Label Label = (Label)NestedViewItem.FindControl("Label1");

 

 

}

 

}

 

}

Tsvetoslav
Telerik team
 answered on 20 Apr 2011
1 answer
62 views
I need to set the amount of pages on the grid.

Each time i change the page i will retrieve data from the database.

Suggestions please
Pavlina
Telerik team
 answered on 20 Apr 2011
4 answers
104 views

Hi,

  I am using RadTreeList and using RadToopTipManager to popup in the TreeList Data. But when i mouse over i am getting a parse error. 

RadToolTip Manager response error: Exception=Sys.Webforms.PageRequestManagerParseErrorException

Please guide me to rectify this error.

Thanks
Kannan
Kannan
Top achievements
Rank 1
 answered on 20 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?