Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
110 views

Hello all,

 Maybe it doesn't sound very likely, but there must be a way to do this.

GridA is a list of all the purchase orders.

GridB is a list of the ordered items included in the selected order of GridA.

An edit form (WebUserControl) of GridB opens the details of the selected item of GridB.

Besides the normal Update/Cancel buttons inside the edit form, there is also a custom button, which creates a new order with the remaining quantity (not received yet) of this specific ordered item. After the custom button click does all the necessary steps, it closes the edit form with <editedItem.OwnerTableView.ClearEditItems()>

When the edit form is closed, a sub in the main aspx page must be executed, which updates the main grid (GridA) and selects the order which was just created. The selection, triggers the SelectedIndexChanged sub which, as stated above, binds the GridB to the items ordered by this new order.

 So, how possible is it to use the RadAjaxManager to trigger this sub, when the edit form is closed?

If not possible, is there another approach to get this behaviour?

 

Thanks

 

 

 

 

In this same edit form, the regular update/cancel buttons also exist and they work fine.

 

Maria Ilieva
Telerik team
 answered on 15 Jun 2015
1 answer
93 views

This all started with the install of the license version of Telerik on my desktop replacing the trial version. 

I have did everything from deleting , re-installing  telerik but I am still getting this error when I try to update the assembilies. Delete the solution and redeploy it multiply times from copying this in the bin to add it as reference. I am still getting that error.

Can anyone help me get this project back on track.

 

Dimitar
Telerik team
 answered on 15 Jun 2015
1 answer
360 views

 

Hi all, I have a radgrid that triggers an opening of a radwindow which is inside of a user control. This user control handles the update and insertion of data and then closes to refresh the grid. However, everything seems to work fine except for refreshing the grid, and I can't seem to figure out why.

 Here is the main page:

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Silk">
</telerik:RadAjaxLoadingPanel>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnResponseEnd="responseEnd">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="telerik">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"/>
                <telerik:AjaxUpdatedControl ControlID="telerik" />
                <telerik:AjaxUpdatedControl ControlID="contactEditor" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadGrid runat="server" ID="telerik" AutoGenerateColumns="False" OnNeedDataSource="telerik_OnNeedDataSource"      OnInsertCommand="telerik_OnInsertCommand"
        OnUpdateCommand="telerik_OnUpdateCommand" OnItemDataBound="telerik_OnItemDataBound" GroupingSettings-CaseSensitive="False" OnItemCommand="telerik_OnItemCommand">
        <MasterTableView DataKeyNames="PRIMARY_KEY">
            <Columns>
                <telerik:GridButtonColumn ButtonType="ImageButton" Text="E" CommandName="Edit2" HeaderText="Edit"/>
                <%-- My other columns to display --%>
            </Columns>
        </MasterTableView>
        <ClientSettings Resizing-AllowColumnResize="True" Scrolling-AllowScroll="True" Selecting-AllowRowSelect="True" ClientEvents-OnPopUpShowing="PopUpShowing" />
    </telerik:RadGrid>
    <icl:ContactEditor runat="server" ID="contactEditor" OnCommitedEvent="contactEditor_OnCommitedEvent"/>
</telerik:RadAjaxPanel>

​Here is the user control:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactEditor.ascx.cs" Inherits="ICL_V2.controls.ContactEditor" %>
<telerik:RadWindow ID="radwindow" runat="server" MinWidth="600px" AutoSize="True" DestroyOnClose="True" Behaviors="Move,Resize, Close">
    <ContentTemplate>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="btnCommit" />
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <div class="form-template">
                <table>
                    <%-- My textbox's and dropdowns --%>
                </table>
                <asp:Button ID="btnCommit" runat="server" class="form-cmd-button" ValidationGroup="form" OnClick="btnCommit_OnClick" />
            </div>
        </telerik:RadAjaxPanel>
    </ContentTemplate>
</telerik:RadWindow>

​When btnCommit is pressed, the corresponding db update/insert is done and then the event OnCommittedEvent is triggered to refresh the grid. The end of the btn click event:

CloseWindow();
OnCommitedEvent(EventArgs.Empty);

 

And then back in the main page

protected void contactEditor_OnCommitedEvent(object sender, EventArgs e)
{
       setDataSource();
       telerik.Rebind();
}

 

This all works without any ajax enabled, but when the ajax is enabled everything works except for the grid refresh at the end. Can anyone point me in the right direction here?

 

Thanks!

Maria Ilieva
Telerik team
 answered on 15 Jun 2015
2 answers
170 views
I am using Detail Item Template for displaying some extra information on radgrid. I am also using rgSelectedRow css for highlighting selected row. I want to highlight the detail item row for the selected row as well. How can I do this? On the documentation in the following url it is mentioned that "Base row style (rgRow, rgAltRow) is applied according to the parent item’s current style.". But how can I apply some css for selected row's detail item?
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/detail-item-template#appearance-and-styling

I also want to keep a button for users to toggling between displaying detail item template row and not displaying. For achieving this I set the visibility of DetailTemplateItemDataCell object of GridDataItem on Grid Pre Render event. But if I set the visibility to false then the row border is vanished. How can I fix this two issues? I've attached a screenshot. Please help. Thanks in advance
Viktor Tachev
Telerik team
 answered on 15 Jun 2015
2 answers
84 views

I got this problem on a project I was unfortunate enough to inherit. I databind the imagegallery and set the page size to 10 (I got 16 images).Page 1 : 10 imagesPage 2: All the imagesThe images gallery is implemented on multiple pages and as such need different width, height and page size. This is set via properties and they all have a default value./**/Thumbnail_RadImageGallery.ThumbnailsAreaSettings.Width = Width; (works fine)
 Thumbnail_RadImageGallery.ThumbnailsAreaSettings.Height = Height;(works fine)
 Thumbnail_RadImageGallery.PageSize = PageSize;/**/​Datasouce is Linq-sql into dataview./**/DataTable table = new DataTable(); table.Columns.Add("Title", typeof(string));
 table.Columns.Add("Description", typeof(string));
 table.Columns.Add("ImageData", typeof(string));
 table.Columns.Add("ToolTip", typeof(string));/**/​

Any suggestions?

If this problem cannot be solved quickly, we plan to skip using this imagegallery and use either Ajax or different.
​

Konstantin Dikov
Telerik team
 answered on 15 Jun 2015
4 answers
292 views

Hi,

I have seen that sets grid properties in PreRender and there is no Rebind but then others (eg. setting header text) that do require ReBind. What are the cases then that will require a call to Rebind for the properties to be set properly?

 

Why I ask: PreRender is so handy because I can handle all grid localization in one call, for both Programmatic and Declarative grids. Rebinding though causes selected rows to get lost so I cannot use that & the only options other than PreRender are to use a combination of Page_Load, ColumnCreated, ItemCreated, ItemDataBound to properly localize all grid items for Programmatic and Declarative grids.

Eyup
Telerik team
 answered on 15 Jun 2015
4 answers
132 views

I am having performance issues with a RadWindow containing a large number of controls and two charts across several tabs.  Initial load is very slow, navigation is acceptable but not ideal.  Additionally, restoring from maximized takes way too long.

Link to sample application demonstrating the problem:  removed due to Telerik End User License Agreement for UI for ASP.NET AJAX violation.

Due to an organizational requirement & legacy applications this solution must be run in IE 10.   

Additional information:  Latest version of Telerik.Web.UI, Visual Studio 2012, IE 10.0.9200.17357

Steps to reproduce:

1) Run the solution without debugging to maximize performace

2) Click the button to launch the RadWindow

3) Note the performance between when the page renders and when it becomes navigable.

4) Maximize the RadWindow - slow but acceptable

5) Restore the RadWindow - completely unacceptable

 

I do not know what I can do to make this better and am open to any and all suggestions to do so, including areas outside of the RadWindow itself (web config, master page, etc).  As you can see in the code I have tried RadInputManager as recommended in the documentation and RadMultiPage.RenderSelectedPageOnly (with conditional binding in the code behind) to see if that would improve anything (it did not).   

Please help!

Blair Davies

Danail Vasilev
Telerik team
 answered on 15 Jun 2015
1 answer
107 views

Hi,

Is it possible to use the arrow keys on a keyboard to do a yahoo style scrolling on the radgrid when there is already a scroll bar implemented on the main page?

 

for instance:

 

main page needs a scroll bar because of the size.

rad grid will need a scroll bar

auto scrolling is set to true

page posts back during scrolling with mouse

must be able to use arrow keys for scrolling

 

Even in the examples on your pages I have noticed that you cant use the arrow keys with the scroll bars.  Is this the norm or am i missing something?

 

thanks

daren

 

 

Konstantin Dikov
Telerik team
 answered on 15 Jun 2015
1 answer
500 views

I am trying to format a date column to MM/dd/yyyy but reguardless of what formatting I attempt it continues to return M/d/yyyy hh:mm:ss AM.

On load of the page I set the ObjetDataSource and convert to a datatable

public static DataTable LoadGrid()
        {
            using (Model.Entities db = new Model.Entities())
            {
                List<Model.FileDetailViewNew> fileView = (from filing in db.FileDetailViewNews
                                                          select filing).ToList();
 
                DataTable table = ToDataTable(fileView);
                return table;
            }
 
        }
 
        private static DataTable ToDataTable<T>(List<T> items)
        {
            DataTable dataTable = new DataTable(typeof(T).Name);
 
            //Get all the properties
            PropertyInfo[] Props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
            foreach (PropertyInfo prop in Props)
            {
                //Setting column names as Property names
                dataTable.Columns.Add(prop.Name);
            }
            foreach (T item in items)
            {
                var values = new object[Props.Length];
                for (int i = 0; i < Props.Length; i++)
                {
                    //inserting property values to datatable rows
                    values[i] = Props[i].GetValue(item, null);
                }
                dataTable.Rows.Add(values);
            }
            //put a breakpoint here and check datatable
            return dataTable;
        }
 

 I then on the page set the grid to the datasource

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="AllFilings" SelectMethod="LoadGrid"></asp:ObjectDataSource>
 
                                <div id="load" style="display: none; color: Red">
                                    <b> Updating filing status please wait...</b>
                                </div>
                                <div id="status" style="color: Red">
                                </div>
                                <telerik:RadGrid ID="gridFilings" runat="server" PageSize="20" AllowPaging="True" AllowSorting="True"
                                    AutoGenerateColumns="False" EnableAJAX="True" DataSourceID="ObjectDataSource1"
                                    EnableAJAXLoadingTemplate="True" GridLines="None" LoadingTemplateTransparency="50" EnableLinqExpressions="false"
                                    ShowStatusBar="True" Skin="Outlook" Width="98%" ShowGroupPanel="True">
                                    <ClientSettings AllowDragToGroup="True">
                                        <Selecting AllowRowSelect="True" />
                                    </ClientSettings>
                                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                    <MasterTableView DataKeyNames="FileID" DataSourceID="ObjectDataSource1" AllowCustomSorting="true">
 

 and then on the grid item

 

<telerik:GridTemplateColumn DataField="DateIn" HeaderText="Date In" SortExpression="DateIn"                                                UniqueName="DateIn" GroupByExpression="DateIn Group By DateIn">
         <ItemTemplate>
                 <%# Eval("DateIn","{0:yyyy MMMM/dd}")%>
         </ItemTemplate>
         <HeaderStyle CssClass="headerLeft" />
</telerik:GridTemplateColumn>

 I have tried  numerous different formatting styles with no success.  I have also tried to change it to a DateTimeColumn and format it there and it stiil continues to show  for example 6/4/2014 12:00:00 AM

 

 

 

Kostadin
Telerik team
 answered on 15 Jun 2015
2 answers
402 views

Hi 

 

I have incorporated a RadHtmlChart on my application and have all the data binding and series set up done client side. The chart displays and has the required functionality except for one thing:

The first time I click on a legend item nothing happens. After this any subsequent clicks have the desired outcome i.e. the series' and legend item's visibility changes. I am not sure why the initial click does not perform these default functions but the 2nd, 3rd, etc clicks do. Can you help? Is there an initialisation I am missing that is triggered by the first click? Is there an extra bind/refresh/redraw needed?

 I appreciate there is no code listed but I'm hoping this is a generic question that someone can help me with.

 

Thanks

Michael

Danail Vasilev
Telerik team
 answered on 15 Jun 2015
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?