Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
89 views
Hi,
In my web page (ASP.Net / VB), I have a RadGrid where I bind data on my BD and all my data is displayed correctly. In my grid, I added in each case (row) an Edit button to change my line.
When I click on my edit button, I call a JS method (client-side) to display my RadWindows.

function openAddPeriodeDialog() {
            var Rad = $find('<%=RadWindowAddPeriode.ClientID%>');
            Rad.show();
}

It displays correctly. In addition, at my edit button, it calls the ItemCommand (server-side) of my RadGrid to make any adjustments.

Dim AnneeFinanciere As String = DirectCast(e.Item, GridDataItem).Item("AnneeFinanciere").Text
txbAnneFianciere.Text = AnneeFinanciere
panelTypePeriode.Visible = False
RadGridIntervalle.DataSource = ObjPeriodeComptableController.GridInsertSelect(AnneeFinanciere)
RadGridIntervalle.Rebind()

My problem is that since my RadWindows is responsible for loading the page, I can not change it's worth, I'm tempted to add at my AjaxManager the method for edit action (ID: ImgEdit in my TemplateColumn) refresh my RadWindows, but it does absolutely nothing happens. 

<telerik:AjaxSetting AjaxControlID="TemplateColumn">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindowAddPeriode" />
            </UpdatedControls>
        </telerik:AjaxSetting>


I do not know if you have an idea or suggestion that would allow me to "fix" my problem, but if that is the case, I thank you in advance ;) 

Thank you !
Mathieu

P.S: Sorry for my English low. 


MathieuB
Top achievements
Rank 1
 answered on 28 May 2013
1 answer
152 views
I have this odd error reported from a client. The dialogs in the editor (table designer, link manager etc.) does not have text in the tabs and labels. They are all blank. However, this is only true if you are logged in as a english localized user. As a danish user, you do not have this problem.
I checked to see if theres something wrong with the localization files, but they are all there with correct access rights and all. RadEditor.Dialogs.resx and RadEditor.Dialogs.da.resx have all the same keys. So why does the editor not read from one file but it does from the other?
I tried renaming RadEditor.Dialogs.resx to RadEditor.Dialogs.en.resx, but no change.



Marin Bratanov
Telerik team
 answered on 28 May 2013
3 answers
158 views
Is there a way to allow a user to input the real font size and not constrain them to the values in the drop down? Can the real font size drop down act more like a combobox with custom text allowed?
Marin Bratanov
Telerik team
 answered on 28 May 2013
1 answer
162 views
I have a custom palette I'd like to use for my Rad Chart. The problem is that only one color gets used per bar. I'm assuming this is because I only have one data series. How to get configure the chart to use a different color for each bar?

Here's my current chart configuration:

<telerik:RadChart runat="server" ID="rc1" DefaultType="Bar" DataSourceID="sds1"
               SeriesOrientation="Horizontal" Width="500px" Height="500px">
              <PlotArea>
                 <Appearance Dimensions-AutoSize="false" Dimensions-Width="400px" Dimensions-Height="400px" Dimensions-Margins="50px" FillStyle-MainColor="72, 102, 137" FillStyle-SecondColor="72, 102, 137">
                 </Appearance>
                 <XAxis Appearance-ValueFormat="General" DataLabelsColumn="Company" Visible="True" Appearance-TextAppearance-TextProperties-Color="Black"></XAxis>
                 <YAxis Appearance-TextAppearance-TextProperties-Color="Black"></YAxis>
               </PlotArea>
               <Series>
                <telerik:ChartSeries DataYColumn="Count">
                    <Appearance>
                            <LabelAppearance>
                                <Shadow Blur="0" Distance="0"  Color="Transparent"/>
                            </LabelAppearance>
                        </Appearance>
                </telerik:ChartSeries>
               </Series>
               <Appearance Dimensions-AutoSize="false" Border-Visible="false">
                  <Shadow Blur="5" Distance="3" />
               </Appearance>
                <Legend Visible="false"></Legend>
                <ChartTitle Visible="true" Appearance-Dimensions-AutoSize="false" Appearance-Dimensions-Width="315px" Appearance-Dimensions-Height="40px"
                  Appearance-Dimensions-Margins="0px" Appearance-Dimensions-Paddings="0px" TextBlock-Text="Chart1" Appearance-Position-Auto="false"
                  Appearance-Position-X="5" Appearance-Position-Y="5" Appearance-Shadow-Color="Transparent"></ChartTitle>
             </telerik:RadChart>
Petar Kirov
Telerik team
 answered on 28 May 2013
2 answers
184 views
I recently upgraded to 2013 controls from 2010. I have a radcombobox with template content. Previously, if I typed in the search box, it would search company name only. But now it searches all text, even that in the itemtemplate (such as address etc.). It is now slower, and searches text that I am not interested in searching. Can you please tell me how to search only the DataTextField and not the itemTemplate content? Thanks in advance.

<telerik:RadComboBox ID="RadComboBoxGoThroughPublisher" Runat="server"
                                            AllowCustomText="True" AutoPostBack="False" CollapseDelay="0"
                                            DataSourceID="DataSourceAllPublishers" DataTextField="Company"
                                            DataValueField="PublisherID" EnableItemCaching="True" ExpandDelay="0"
                                            Filter="Contains" HighlightTemplatedItems="True" MarkFirstMatch="True"
                                            MaxHeight="300px"
                                            SelectedValue='<%# myHelperObject.helperGetLicenseThroughPublisherID(Eval("LicenseThroughPublisherID")) %>'
                                            TabIndex="8" Width="340px">
                                            <ItemTemplate>
                                                <span>
                                                <hr />
                                                </span>
                                                <asp:Label ID="LabelCompanyShort" runat="server" CssClass="blueHyperlink"
                                                    Text='<%# Eval("CompanyShort") %>'></asp:Label>
                                                <br />
                                                <span>
                                                <asp:Label ID="LabelCompany" runat="server" CssClass="blueHyperlink"
                                                    Text='<%# Eval("Company") %>'></asp:Label>
                                                </span>
                                                <br />
                                                <span>
                                                <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                                                <br />
                                                <asp:Label ID="lblCityStateZip" runat="server"
                                                    Text='<%# myHelperObject.helperGetFormattedCityStateZip(Eval("City"),Eval("State"),Eval("ZipCode"),1,1,0) %>'></asp:Label>
                                                <asp:Panel ID="PanelPartner" runat="server"
                                                    Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("Active")) %>'>
                                                    <div style="padding: 3px">
                                                        <span>
                                                        <asp:Label ID="LabelPartner" runat="server" CssClass="mediumBoldDarkAquaHeader"
                                                            Text="Partner"
                                                            Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("Active")) %>'></asp:Label>
                                                         <asp:Label ID="LabelPartnerSynch" runat="server"
                                                            CssClass="mediumBoldDarkAquaHeader" Text="- Synch Allowed"
                                                            Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("SynchronizationAllowed")) %>'></asp:Label>
                                                        </span>
                                                    </div>
                                                </asp:Panel>
                                                </span>
                                            </ItemTemplate>
                                        </telerik:RadComboBox>
Mark
Top achievements
Rank 1
 answered on 28 May 2013
20 answers
1.9K+ views
I really like the look and feel of the RadAsyncUpload, but I can't seem to figure out how to use it.  None of the demos show how to do a simple save file.  I can get my code to save the temp file to the App_Code/RadUploadTemp folder, but I can't figure out how to access that file and rename/save it to it's actual location.  I've been trying to use the UploadedFileInfo.TempFileName method, but I get an unreadable string returned.

Any demos or help would be greatly appreciated!
Plamen
Telerik team
 answered on 28 May 2013
4 answers
280 views
Hi!

When we display a RadDatePicker control (see attached #1), we are able to add a special day of "today" using this code:
<telerik:RadDatePicker ID="radDatePickerBirthdateSearchCriteria" MinDate="1/1/1900" runat="server">
    <Calendar ShowRowHeaders="false" runat="server">
        <SpecialDays> 
            <telerik:RadCalendarDay Repeatable="Today"> 
                <ItemStyle CssClass="rcToday" /> 
            </telerik:RadCalendarDay> 
        </SpecialDays> 
    </Calendar>
</telerik:RadDatePicker>

However, when we display a grid column using this code:
<telerik:GridDateTimeColumn EnableTimeIndependentFiltering="true" DataField="Birthdate" DataFormatString="{0:MM/dd/yyyy}"  HeaderText="Birthdate" SortExpression="Birthdate" UniqueName="Birthdate">
</telerik:GridDateTimeColumn>

protected void radGridResults_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridFilteringItem)
            {
                GridFilteringItem filteringItem = e.Item as GridFilteringItem;
 
                RadDatePicker radDatePicker = (RadDatePicker)filteringItem["Birthdate"].Controls[0];
                radDatePicker.EnableEmbeddedSkins = true;
                radDatePicker.Skin = "Office2010Blue";
                radDatePicker.CssClass = "radDatePicker radGridFilterDatePicker";
                radDatePicker.SharedCalendar.ShowRowHeaders = false;
                Button buttonDatePickerFilter = (Button)filteringItem["Birthdate"].Controls[2];
                buttonDatePickerFilter.CssClass = "rgFilter radGridFilterDatePickerFilterButton";
                RadCalendarDay radCalendarDayToday = new RadCalendarDay();
                radCalendarDayToday.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Today;
                radCalendarDayToday.ItemStyle.CssClass = "rcToday";
                radDatePicker.Calendar.SpecialDays.Add(radCalendarDayToday);
            }
        }


When we add the special day in code behind, it does not display properly when we are displaying the calendar as a filter (see attached #2.)

Are we doing something wrong? How can we accomplish this?

Thanks!
Michael O'Flaherty
Top achievements
Rank 2
 answered on 28 May 2013
2 answers
106 views
I have an upload control sitting sitting within a table on a FormView edit template.

Initially I was having problems with the clickable area of the skinned button being different from the viewable area of the skinned button so I turned off skinning.

Now the un-skinned control 'sticks' to the page when scrolling. The rest of the page scrolls but the radupload maintains an absolute position on the skin.

Any ideas?

Cheers
Aaron
Mohamed Salah Al-Din
Top achievements
Rank 1
 answered on 28 May 2013
2 answers
138 views

Dear Telerik Team,

We are using the radgrid to perform insert/update/delete functionalities.


Problem:
The update button in the radgrid is not working when we add the grid in the ajax manager settings.
But if we do not include the radgrid in the ajax manager settings, the update button is hitting the server side while clicking it.
This happens when we add the client side javascript code for validation, while updating in the grid.


Required Solution:
After performing the validation in the client side for radgrid update button, If the validation is success, the grid update button should call the server side code.


Product: "Telerik RadControls for ASP.NET AJAX Q1 2012"

Please look into this issue and get back to us ASAP.

Please find below sample code for your reference.


--------------------sample code-----------------------
//-->this code is not calling the server side, on grid update button
----------------------------------
<telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        runat="server">
        <ClientEvents />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
----------------------------------
----------------------------------

 
//this code is calling the server side, on grid update button
----------------------------------
<telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        runat="server">
        <ClientEvents />
        <AjaxSettings>
        </AjaxSettings>
    </telerik:RadAjaxManager>
----------------------------------
---------
//////////////////////////////////

 

/////////////////About.aspx/////////////////////////////
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="About.aspx.cs" Inherits="About" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        runat="server">
        <ClientEvents />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

            function ValidateOnInsert(PRODUCTID) {
                alert('ValidateOnInsert() called...');
                var txtPRODUCTID = document.getElementById(PRODUCTID);

                return true;
            }

        </script>
    </telerik:RadCodeBlock>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" BorderStyle="Solid"
            CellSpacing="0" AllowPaging="True" Height="401px" OnItemDataBound="RadGrid1_ItemDataBound">
            <MasterTableView CommandItemDisplay="Top" AllowPaging="true" PageSize="10">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle></ItemStyle>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ConfirmText="Do you want to delete the PRODUCT?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn">
                    </telerik:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <div style="padding: 5px 5px;">
                        <asp:LinkButton ID="lnkBtnAddNewPRODUCT" runat="server" CommandName="InitInsert"
                            Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" />Add new PRODUCT</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkBtnRefreshPRODUCTList" runat="server" CommandName="RebindGrid"><img id="imgRefreshPRODUCTList" style="border:0px;vertical-align:middle;" alt="" />Refresh</asp:LinkButton>
                    </div>
                </CommandItemTemplate>
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                </ExpandCollapseColumn>
                <EditFormSettings EditFormType="Template">
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                    <FormTemplate>
                        <div>
                            <table id="Table2" border="0" cellpadding="1" cellspacing="2" rules="none" style="border-collapse: collapse;">
                                <tr class="EditFormHeader">
                                    <td colspan="2" style="font-size: small">
                                        <b>PRODUCT Details:</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table id="tbl" border="0" cellpadding="1" cellspacing="1" class="module">
                                            <tr>
                                                <td>
                                                    <asp:Label runat="server" Text="*" ID="Label1" CssClass="lblMandatory"></asp:Label>
                                                    PRODUCTID:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtPRODUCTID" runat="server" Text='<%# Bind("PRODUCTID") %>'>
                                                    </asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" align="right">
                                        <asp:Button ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                                        &nbsp;
                                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                            Text="Cancel" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" CellSelectionMode="None" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
    </div>
</asp:Content>
///////////////////////////////////////////////////////////////////

///////////////////////About.aspx.cs//////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;

public partial class About : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{
        //    RadGrid1.DataSource = GetData();
        //}

        RadGrid1.DataSource = GetData();
    }

    private DataTable GetData()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("PRODUCTID");
       
        for(int i=0;i<50;i++)
        {
            DataRow dr=dt.NewRow();
            dr["PRODUCTID"] = i;
            dt.Rows.Add(dr);
        }

        return dt;

    }
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
        {
            GridEditFormItem editFormItem = (GridEditFormItem)e.Item;
            Button update = (Button)editFormItem.FindControl("btnUpdate");

            TextBox box = null;
            string paramerters = string.Empty;

            box = editFormItem.FindControl("txtPRODUCTID") as TextBox;
            paramerters += box.ClientID + "', '";
       
            update.Attributes.Add("onclick", "return ValidateOnInsert('" + paramerters + "')");
        }
    }
}

///////////////////////////////////////////////////////////////////

Thanks & Regards,
D. Senthil kumar vijai.

Andrey
Telerik team
 answered on 28 May 2013
5 answers
242 views
Is there a way to show validation messages as a tooltip next to the control?

I am currently doing this manually from code and was wondering if there was a way to use the validation controls and link them to tooltips instead. Also, the tooltip don't always show up next to the control in Firefox. It will show at the edge of the screen.
Marin Bratanov
Telerik team
 answered on 28 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?