Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
Hi,

We have an issue with the latest Telerik DLLs version 2012.1.215.35 when deploying a generated build on a server situated in a past time zone.  For example, our TFS build engine server is in IST Timezone and our deployment server is in Eastern Timezone.  The last modified date and time will be Aug 28 1:00 PM.  If these DLLs are deployed on our deployment server which is Aug 28 2:30 AM then we are experiencing a user interface issue (see attached screenshot).

Previously, this issue did not occur for the previous Telerik version 2008.2.1001.35 for the same scenario.

Would you kindly clarify why this problem is occuring?

Thanks,

Andre
Dobromir
Telerik team
 answered on 30 Aug 2012
6 answers
247 views

Team,

I have added attribute to RadDatePicker control while dynamically creating it.
This attribute contains the date time of the control creation(DateTime.Now.ToString()).
I have retrieved attribute value from in client side.
But I am not able to set Raddatepickers value to that attribute value in client side .
Please let me know  how I can achieve this task?

Any help will be appreciable. 

Regards,
Sampada 


Eyup
Telerik team
 answered on 30 Aug 2012
2 answers
150 views
Hi,

I have a RadPanelBar, when panel bar item was clicked it was causing postback:

<telerik:RadPanelBar runat="server" ID="pnlPageComponents" Width="100%" OnClientLoad="componentsPanelClientLoad" onitemclick="pnlAdditionalPageEntities_ItemClick"
    OnClientItemClicked="componentsPanelClientClicked">
    <CollapseAnimation Type="None"></CollapseAnimation>
    <ExpandAnimation Type="None"></ExpandAnimation>
    <Items>
        <telerik:RadPanelItem Height="29px" Text="Components" Value="Components" CssClass="rpHeader1">
            <HeaderTemplate>
                <span class="rpOut rpNavigation" style="cursor:pointer; border-left:1px solid #cccccc; border-right:1px solid #cccccc;">
                    <span class="panelExpandIcon"></span>
                    <span class="rpText">
                        <asp:Label ID="lblHeader0Components" runat="server"></asp:Label>
                        <asp:Label ID="lblItemStatus0Components" CssClass="pageContentComponentsEditorHeaderDescriptionBlue" runat="server"></asp:Label>
                    </span>
                </span>
            </HeaderTemplate>
            <ContentTemplate>
                <asp:UpdatePanel ID="UpdatePanelComponents" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <uc4:Components ID="pageComponentsList" runat="server" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

in onclick event:
bool shouldRender = e.Item.Expanded = !e.Item.Expanded;
e.Item.PostBack = false; // yes, I don't want it to cause postback on consequent clicks

as you can see I was expanding it manually and depending on shouldRender variable I was doing databinding. This has been around for over 6 month and I was updating your controls regularly for this project. Today I got Q2 2012 and now this logic doesn't work anymore. What happens is that I can see that RadPanelBar first expands itself and then causes a postback, so first I see inner control's unbound view and then when postback completes - I see the data. I had to make a change to onclick event:
bool shouldRender = e.Item.Expanded;// = !e.Item.Expanded; <-- manually setting it *now* was collapsing, cause item was already expanded.

So my question is how to get back to original behavior when I don't want to item to expand itself on client side, but just cause a postback in collapsed state, I will do my stuff on server-side callback and set "expanded" property myself (as I was doing previously)?

Thank you!

P.S.: please check release notes for RadPanelBar for Q2 2012 - this should give you some hints in the "fixed" section.
Shukhrat Nekbaev
Top achievements
Rank 1
 answered on 30 Aug 2012
3 answers
87 views
I can't seem to get the pager text of a RadGrid to render.
We're not doing anything special, am I not seeing something?

ASPX:
<rad:RadGrid ID="rgBestellingen" runat="server" AllowPaging="True" runat="server" GridLines="None" Width="90%">
    <MasterTableView>
        <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right"></PagerStyle>
    </MasterTableView>
</rad:RadGrid>

CS:
public partial class Test : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<string[]> items = new List<string[]>(50);
        for (int i=0;i<50;i++)
            items.Add(new string[3] { "1", "2", "3" });
 
        rgBestellingen.DataSource = items;
        rgBestellingen.VirtualItemCount = items.Count;
        rgBestellingen.Rebind();
    }
}

But the grid always renders as in the screenshot. Can anyone help?

John
Eyup
Telerik team
 answered on 30 Aug 2012
1 answer
77 views
Hi,

We would like to be able to do the following in our RadEditor:
 - Set ImageManager-ViewPaths to point to a common folder PLUS a unique folder for each customer
 - Set ImageManager-UploadPaths and ImageManager-DeletePaths to ONLY point at the unique folder

This way we can offer the customer a variety of images that we provide, plus any they want to add themselves, but they can only upload or delete from their own unique folder.

I tried the following without success:

protected void edtQuestRichText_PreRender(object sender, EventArgs e)
    {
        RadEditor edtQuestRichText = (sender as RadEditor);
        edtQuestRichText.ImageManager.ViewPaths = new String[] { "~/CommonImages", Session["currentCustomerImagesFolder"].ToString() };
    }

Any suggestions?

Thanks in advance

Jim
Rumen
Telerik team
 answered on 30 Aug 2012
3 answers
110 views
Hi Telerik,
I have a RadGrid, that I have set up to allow me to select rows by clicking on them
<telerik:RadGrid ID="RadGrid1" runat="server"
            AutoGenerateSelectColumn="True"
            CellSpacing="0" GridLines="Horizontal" AutoGenerateColumns="False" OnClientClick="RadGrid1_SelectedIndexChanged">
            <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true" />
            </ClientSettings>
<MasterTableView>
 
<Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                        </ItemTemplate>
                        <FooterStyle Width="32px" />
                        <HeaderStyle Width="32px" />
                        <ItemStyle Width="32px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="UniqueID" HeaderText="Unique ID" UniqueName="UniqueID"  FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" Visible="false"/>
                    <telerik:GridBoundColumn DataField="Telephone" HeaderText="Telephone" UniqueName="Telephone"  FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" Visible="false"/>
                    <telerik:GridBoundColumn DataField="StatusID" HeaderText="StatusID" UniqueName="StatusID"  FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" Visible="false"/>
                    <telerik:GridBoundColumn DataField="Customer" HeaderText="Customer" UniqueName="Customer"  FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" />
                    <telerik:GridBoundColumn DataField="From" HeaderText="From" UniqueName="From"  FooterStyle-Width="100px" HeaderStyle-Width="100px" ItemStyle-Width="100px" Visible="false"/>
                    <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" UniqueName="Subject"  FooterStyle-Width="100px" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Taken By" UniqueName="Name"  FooterStyle-Width="100px" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                    <telerik:GridBoundColumn DataField="TakenOn" HeaderText="Taken On" UniqueName="TakenOn"  FooterStyle-Width="100px" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                    <telerik:GridBoundColumn DataField="Urgent" HeaderText="Urgent" UniqueName="Urgent"  FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" />
                    <telerik:GridBoundColumn DataField="StatusNew" HeaderText="Status" UniqueName="StatusNew"  FooterStyle-Width="100px" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
</Columns>
 
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="5px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="5px"></HeaderStyle>
</ExpandCollapseColumn>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>

From here I would like to retrieve the uniqueID by using the allowrowselect feature
How would i retrieve the data in the uniqueID column, on my selected row. I'm working in VB, however an answer in c# is fine.

Your help is greatly appreciated!
Ryan


Also when i use

Dim item As GridDataItem = TryCast(RadGrid1.SelectedItems(0), GridDataItem)

I get an argument out of range exception
Saying my index was out of range. must be non-negative and less than the size of the collection

Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Aug 2012
1 answer
85 views
I have a Radgrid with multiselect , but i cant seems to find out how to get the list of column values that are selected.
Can someone help me out ? Ill attached my code.
                    <telerik:RadGrid ID="ClientenGrid" runat="server" AllowMultiRowSelection="True"
                        CellSpacing="0" GridLines="None"
                        OnNeedDataSource="ClientenGrid_NeedDataSource"
                         AllowPaging="True" PageSize="7" DataMember="ID">
                         
                        <ClientSettings>
                            <Selecting AllowRowSelect="True" />
                            <ClientEvents OnCellSelecting="ClientenGrid_OnCellSelecting" />
                        </ClientSettings>
                         
                        <MasterTableView DataMember="ID">
                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                                Visible="True">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                                Visible="True">
                            </ExpandCollapseColumn>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                        </MasterTableView>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                    <br/>
                    <table style="float: left;">
                        <tr>
                            <td>
                                <asp:Label ID="AantalClienten" runat="server" Text="Aantal cliënten geslectecteerd: "></asp:Label><asp:Label
                                    ID="Aantal" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table style="float: right;">
                        <tr>
                            <td>
                                <dx:ASPxButton ID="OKBtn" runat="server" Text="Ok" AutoPostBack="False">
                                    <ClientSideEvents Click="function(s, e) {
    ClientenPicker.Hide();
}" />
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="CancelBtn" runat="server" Text="Cancel" AutoPostBack="False">
                                    <ClientSideEvents Click="function(s, e) {
    ClientenPicker.Hide();
}" />
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
Eyup
Telerik team
 answered on 30 Aug 2012
3 answers
147 views
Hi there,
  I am using a RadEditor with an ImageManager. This worked fine when specifying paths relative to the application:
<ImageManager ViewPaths='/blogUpload/postimage/' DeletePaths='/blogUpload/postimage/'
                            UploadPaths='/blogUpload/postimage/' MaxUploadFileSize="6553600" />

But I'm unable to get it working again after I moved the site to a load-balanced environment which has a shared location for file uploads "E:\SharedFiles" 

The following syntax doesn't allow image uploads and gives 404 errors on other buttons within the ImageManager

                string[] viewImages = new string[] { "/blogupload/postimage/" };
                string[] uploadImages = new string[] { @"E:\SharedFiles\blogupload\postimage"};
                string[] deleteImages = new string[] { @"E:\SharedFiles\blogupload\postimage"};
                RadEditorContent.ImageManager.ViewPaths = viewImages;                 RadEditorContent.ImageManager.UploadPaths = uploadImages;                 RadEditorContent.ImageManager.DeletePaths = deleteImages;                 RadEditorContent.ImageManager.MaxUploadFileSize = 6553600;

I've based the above approach from this page

Is there something wrong with how I'm approaching this? The above code doesn't even work on my local machine with "C:\folder\folder\" for uploadImages and deleteImages

Dobromir
Telerik team
 answered on 30 Aug 2012
0 answers
54 views
Hello,

when I try to set a date for RadTimePicker on my page load, I get the JS error: "_dateIput is null".
RadTimePicker is a subcontrol of another IScriptControl, and it is created programmatically in its OnInit function.

I guess that situation is similar to this thread but I can't see an answer in it.
So, my question is: when _dateInput is created and how could I access it from JS on my page load?

If it matters, I'm using Telerik AJAX controls version 2010.3.1109.

Thanks in advance,
Ilya.
Seekbirdy
Top achievements
Rank 1
 asked on 30 Aug 2012
5 answers
148 views
Dear Telerik,

We are experiencing a strange thing with the RadGrid. We have set up a RadGrid clientside, all clientside. Paging, Adding and Deleting are done clientside.

What we come across is that every second time we Delete a row(by calling the deleteCustomer function) the  masterTable.deleteSelectedItems(); is not executed. But the console.log just above it is executed so it makes it too that function each time you want to delete an item.
The basic idea of deleting these items is that when a row is selected, an javascript array is filled with IDs and when the deleteCustomer function is executed, it fires an ajax call to the webservice to do database updates. And after waiting for the result to come back, it deletes the row from the grid.

Is there a bug in the RadGrid that makes it unavailable for a small time or are we not implementing this correctly?
I have put the RadGrid and Jquery code beneath.

By the way, we also used masterTable.rebind function instead of the deleteSelectedItems but that has the same effect.

Thank you for your time.

Vincent

<telerik:RadGrid ID="AudienceRecipientsGrid" runat="server" Width="695" AllowPaging="True" PageSize="15" AutoGenerateColumns="false" AllowMultiRowSelection="true" >
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    <MasterTableView TableLayout="Fixed" DataKeyNames="CustomerID" ClientDataKeyNames="CustomerID">
        <Columns>
            <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32" FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID" Visible="False" ReadOnly="True"></telerik:GridBoundColumn>
            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="6%" ItemStyle-Width="6%">
                    <HeaderStyle Width="6%"></HeaderStyle>
                    <ItemStyle Width="6%"></ItemStyle>
                </telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Voornaam" SortExpression="Name" UniqueName="Name"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SurName" FilterControlAltText="Filter SurName column" HeaderText="Achternaam" SortExpression="SurName" UniqueName="SurName"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Email" FilterControlAltText="Filter Email column" HeaderText="E-mail" SortExpression="Email" UniqueName="Email"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="joindate" DataType="System.DateTime" FilterControlAltText="Filter joindate column" HeaderText="Inschrijfdatum" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" UniqueName="joindate" ReadOnly="true" ></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
        <Scrolling AllowScroll="False" EnableVirtualScrollPaging="True" UseStaticHeaders="True"></Scrolling>
        <DataBinding Location="~/ems/EMSWS.asmx" StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maxRows"></DataBinding>
        <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" OnRowCreated="RowCreated" OnRowDataBound="RowDataBound" />
    </ClientSettings>
    <PagerStyle Mode="NumericPages" />   
    <FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
<span onclick="deleteCustomers()" class="cms_hyperlink">Ontvangers verwijderen</span>

All grid logic is done here:
//Grid logic
var selected = {};
function RowSelected(sender, args) {
    var customerID = args.getDataKeyValue("CustomerID");
    if (!selected[customerID]) {
        selected[customerID] = customerID;
    }
}
function RowDataBound(sender, args) {
    //Every time a new page is loaded, all rows are unselected....
    var customerID = args.get_dataItem()["CustomerID"];
    if (selected[customerID]) {
        args.get_item().set_selected(true);
    }
    else {
        args.get_item().set_selected(false);
    }
}
function RowDeselected(sender, args) {
    var customerID = args.getDataKeyValue("CustomerID");
    if (selected[customerID]) {
        selected[customerID] = null;
    }
}
function RowCreated(sender, args) {
    var customerID = args.getDataKeyValue("CustomerID");
    if (selected[customerID]) {
        args.get_gridDataItem().set_selected(true);
    }
}
 
//Deleting customers
function deleteCustomers() {
    WSdeleteCustomers();
}
function WSdeleteCustomers() {
    var dfd = new jQuery.Deferred();
    $.ajax({
        type: 'POST',
        url: "/ems/emsws.asmx/RemoveEmailFromAudience",
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        data: "{ 'strCustomerIDs': '" + GetSelectedCustomers() + "', 'iAudienceID': '" + getParameterByName('id') + "' }",
        cache: false,
        success: function (data) {
            dfd.resolve();
        }
    }).done(function () {
        dfd.promise();
    }).pipe(function () {
        reloadGridAfterDelete();
    });
}
function GetSelectedCustomers() {
    var allids = '';
    var grid = $find("<%=AudienceRecipientsGrid.ClientID %>");
    var MasterTable = grid.get_masterTableView();
    var selectedRows = MasterTable.get_selectedItems();
    for (var i in selected) {
        allids = allids + i + ',';
    }
    return allids;
}
 
function reloadGridAfterDelete() {
    //console.log("reload grid");
    var masterTable = window.$find("<%= AudienceRecipientsGrid.ClientID %>").get_masterTableView();
    //masterTable.rebind();
    console.log("deleteSelectedItems()");
    masterTable.deleteSelectedItems();
    }







Antonio Stoilkov
Telerik team
 answered on 30 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?