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

I would like to use the Telerik controls in multiple languages (german, french, italian, english) in more than one applications.
My idea was to translate the labels with resource files (.resx) and put the files on a central server, where every application can use them.
But now i have to set the "LocalizationPath" property on every Telerik control.

Is there a global configuration i can set for the LocalizationPath? Maybe in the web.config?
Or is there another solution for my problem?

Thank you very much!

Best regards,
Mathias
Rumen
Telerik team
 answered on 13 Jun 2014
2 answers
155 views
Hi Guys,

In my edit form template, I need to open a panel that holds a RadEditor on the conditional selection from a RadComboBox that is also in the edit form template.
So for example, if the user selects'add extra details' a panel will open with an editor.

Cheers in advance,

Jon

 
Jon
Top achievements
Rank 1
 answered on 13 Jun 2014
1 answer
86 views
Hello everybody,

again I have a Problem I simply can not get solved. I have a databound RadGrid with several pages.
All the grids rows are in EditMode and shall stay in EditMode. I handle the Updating with an own
routine. Now when I apply changes to some Entries on one page and then change the page to edit
some more, the entries on the initial page are Reset. 
I guess I know why this is happening. As long as I do not fire my SQL update method, the underlying
database is logically not updated. As to keep all rows permanently I copied this example into my
PreRender. As this implies rebinding and fires every time i change the page the orginial SQL
data is loaded. Am I right about this (just for my understanding)?

Is there any approach to achieve what I want to do.

Thank you very much!

Max
Princy
Top achievements
Rank 2
 answered on 13 Jun 2014
2 answers
218 views
I'm using the Batch Editing example as the basis of a page I'm doing.

It's ideal, because the users need to edit multiple rows and click save. The example does that with the Save Changes at the bottom. The down side is that I need to put in business logic on the create, update, and delete. Normally, I can do that, even with a SQLDataSource, using the SQLDataSource events (ex. PropertyHistories_Updating). The problem is that these events are not triggering.

Yes, I know that I could use Advanced Binding, but am unsure how this example would work with it.  :)
Any ideas?  (see attached)

Thanks,
Jason

Code:
BatchTest.aspx
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" HorizontalAlign="NotSet">
            <p>Hotel Name: <telerik:RadComboBox ID="HotelList" Width="500" runat="server" DataSourceID="Hotels" DataTextField="myview" 
                  AllowCustomText="false" Filter="StartsWith" ShowMoreResultsBox="true" DataValueField="Inncode" />
                <p>
                </p>
                <h3>Property History</h3>
                <telerik:RadGrid ID="PropertyHistory" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="PropertyHistories" OnBatchEditCommand="PropertyHistory_BatchEditCommand" OnItemDeleted="PersonnelHistory_ItemDeleted" OnItemInserted="PropertyHistory_ItemInserted" OnItemUpdated="PropertyHistory_ItemUpdated" OnPreRender="PropertyHistory_PreRender" Width="750px">
                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Bottom" DataKeyNames="RMCCHistoryID" DataSourceID="PropertyHistories" EditMode="Batch">
                        <BatchEditingSettings EditType="Row" OpenEditingEvent="Click" />
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="RMCCHistoryID" SortOrder="Descending" />
                        </SortExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="Model" HeaderText="RMCC Support Model" UniqueName="Class">
                                <ItemTemplate>
                                    <%# Eval("Model") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="false" DataSourceID="Models" DataTextField="Model" EmptyMessage="Search Models" EnableAutomaticLoadOnDemand="true" Filter="StartsWith" Height="200px" ShowMoreResultsBox="true" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Start Date" UniqueName="startdate">
                                <ItemTemplate>
                                    <asp:Label ID="date" runat="server" Text='<%# Eval("startdate") %>' />
                                    &nbsp;
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="picker1" runat="server" DbSelectedDate='<%# Bind("startdate") %>' MaxDate="12/31/2173" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="End Date" UniqueName="enddate">
                                <ItemTemplate>
                                    <asp:Label ID="date" runat="server" Text='<%# Eval("enddate") %>' />
                                    &nbsp;
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="picker1" runat="server" DbSelectedDate='<%# Bind("enddate") %>' MaxDate="12/31/2173" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to Delete?" ConfirmTitle="Delete" HeaderStyle-Width="50px" HeaderText="Delete" Text="Delete" UniqueName="DeleteColumn" />
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

                <p>&nbsp;</p>
                <telerik:RadListBox ID="SavedChangesList1" runat="server" Height="200px" Visible="false" Width="600px">
                </telerik:RadListBox>
           
                <telerik:RadListBox ID="SavedChangesList" runat="server" Height="200px" Visible="false" Width="600px" />
                <asp:SqlDataSource ID="PropertyHistories" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="spUAPPropertyHistory" SelectCommandType="StoredProcedure" DeleteCommand="spUAPPropertyHistoryDelete" DeleteCommandType="StoredProcedure" InsertCommand="spUAPPropertyHistoryInsert" InsertCommandType="StoredProcedure" UpdateCommand="spUAPPropertyHistoryUpdate" UpdateCommandType="StoredProcedure" OnDeleting="PropertyHistories_Deleting" OnInserting="PropertyHistories_Inserting" OnUpdating="PropertyHistories_Updating">
                  
                    <DeleteParameters>
                        <asp:Parameter Name="RMCCHistoryID" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="RMCCModelLvl2ID" Type="Int32" />
                        <asp:Parameter Name="RATPropID" Type="Int32" />
                        <asp:Parameter Name="StartDate" Type="String" />
                        <asp:Parameter Name="EndDate" Type="String" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:ControlParameter ControlID="HotelList" DefaultValue="ABC" Name="Inncode" PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="RMCCHistoryID" Type="Int32" />
                        <asp:Parameter Name="RMCCModelLvl2ID" Type="Int32" />
                        <asp:Parameter Name="StartDate" Type="String" />
                        <asp:Parameter Name="EndDate" Type="String" />
                    </UpdateParameters>
                  
                </asp:SqlDataSource>
                
                <asp:SqlDataSource ID="Hotels" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Usename + ' - ' + Inncode as myview, Inncode 
                        From x 
                        Order by 1 Asc">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Contacts" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Distinct CorpContactFullName 
                        From y
                        Order By 1">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Models" runat="server" ConnectionString="<%$ ConnectionStrings:Bob %>" SelectCommand="Select Distinct CorpContactFullName 
                        From z
                        Order By 1">
                </asp:SqlDataSource>
                        
        </telerik:RadAjaxPanel>
    </form>
</body>


BatchTest.cs:

 protected void PropertyHistory_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        SavedChangesList.Visible = true;
    }

    protected void PropertyHistory_ItemUpdated(object source, GridUpdatedEventArgs e)
    {
        GridEditableItem item = (GridEditableItem)e.Item;
        string id = item.GetDataKeyValue("RMCCHistoryID").ToString();

        if (e.Exception != null)
        {
            e.KeepInEditMode = true;
            e.ExceptionHandled = true;
            NotifyUser("ID " + id + " cannot be updated. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("ID " + id + " is updated!");        
    }

    protected void PropertyHistory_ItemInserted(object source, GridInsertedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            NotifyUser("Cannot be inserted. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("New product is inserted!");        
    }

    protected void PropertyHistory_ItemDeleted(object source, GridDeletedEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.Item;
        string id = dataItem.GetDataKeyValue("RMCCHistoryID").ToString();
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            NotifyUser("ID " + id + " cannot be deleted. Reason: " + e.Exception.Message);
        }
        else
            NotifyUser("ID " + id + " is deleted!");
    }

    protected void PropertyHistory_PreRender(object sender, EventArgs e)
    {      
        //RadNumericTextBox w = (PersonnelHistory.MasterTableView.GetBatchColumnEditor("UnitsInStock") as GridNumericColumnEditor).NumericTextBox;
        //w.Width = Unit.Pixel(60);
        //TextBox x = (PersonnelHistory.MasterTableView.GetBatchColumnEditor("QuantityPerUnit") as GridTextBoxColumnEditor).TextBoxControl;
        //x.Width = Unit.Pixel(120);
    }
]
    private void NotifyUser(string message)
    {
        RadListBoxItem commandListItem = new RadListBoxItem();
        commandListItem.Text = message;
        SavedChangesList.Items.Add(commandListItem);
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void PropertyHistories_Deleting(object sender, SqlDataSourceCommandEventArgs e)
    {
        // NOT BEING HIT!
        var x = e;
    }
    protected void PropertyHistories_Inserting(object sender, SqlDataSourceCommandEventArgs e)
    {
         // NOT BEING HIT!
        var x = e;
    }
    protected void PropertyHistories_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
         // NOT BEING HIT!
        var x = e;
    }








Konstantin Dikov
Telerik team
 answered on 13 Jun 2014
1 answer
49 views
Hello,

I am trying to get the item count in each group and display the count in the group footer and the total grid items count in the grid footer.

I tried several ways using the aggregate function which works fine at the grid footer level but at the group level it only displays the number of items in the page. Any help will be appreciated.

Thanks in Advance

Chaitanya Vemulapalli
Radoslav
Telerik team
 answered on 13 Jun 2014
6 answers
589 views
Hello everybody,

I already searched for the solution of my problem but did not find anything to work. I Build a RadGrid an bind it to a SQL Datasource. Now I want to fill the Dropdownlists in the Radgrid with values from a different code behind stored procedure. Somehow I can not access the two DropDownLists from my code behind. I would be very thankful if someone could help me out. Here is my code:

<telerik:RadGrid runat="server" ID="gridFktWipoHague" Culture="de-DE">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="LAND_KZ" ReadOnly="true">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn DataField="PMMA_Add">
                <EditItemTemplate>
                    <telerik:RadDropDownList runat="server" ID="PMMA_Add_DropDown">
                    </telerik:RadDropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridDateTimeColumn DataField="HAGUE_DATUM">
            </telerik:GridDateTimeColumn>
            <telerik:GridTemplateColumn>
                <EditItemTemplate>
                    <telerik:RadDropDownList runat="server" ID="HAGUE_Add_DropDown">
                    </telerik:RadDropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="HAGUE_DELETE">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn ReadOnly="true" DataField="Counter_pm">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn ReadOnly="true" DataField="Counter_ps">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="TMVIEW">
            </telerik:GridCheckBoxColumn>
        </Columns>
    </MasterTableView>
    <ExportSettings>
        <Pdf PageWidth="">
        </Pdf>
    </ExportSettings>
 
</telerik:RadGrid>

Thank you very much,

Max
Max
Top achievements
Rank 1
 answered on 13 Jun 2014
2 answers
124 views
Is is possible to add plotbands to a date axis on a htmlchart? If so how? I can't find any reference to it.
Danail Vasilev
Telerik team
 answered on 13 Jun 2014
1 answer
155 views
Could you tell me why my code for RadGrid does not expand. It is very small but it has data in it. The only way I can expand it is to use with a meta tag and emulate IE7, but it is not what I want. 


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Grid.aspx.vb" Inherits="Grid.Grid" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
    <div>
    
    </div>
        <telerik:RadGrid runat="server" AutoGenerateColumns="False"
                    GridLines="None" Skin="Outlook" Height="95%" Width="98%" DataSourceID="SqlDataSource1">
                    <ClientSettings>
                        <Scrolling AllowScroll="False" UseStaticHeaders="True" ScrollHeight="200px" />
                    </ClientSettings>
                    <MasterTableView  TableLayout="Auto" Width="94%" DataSourceID="SqlDataSource1">
                        <RowIndicatorColumn Visible="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="False" Resizable="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="id" HeaderText="id" UniqueName="id" DataType="System.Int32" FilterControlAltText="Filter id column" SortExpression="id" >
<ColumnValidationSettings>
<ModelErrorMessage Text=""></ModelErrorMessage>
</ColumnValidationSettings>

                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="masterBatchNo" FilterControlAltText="Filter masterBatchNo column" HeaderText="masterBatchNo" SortExpression="masterBatchNo" UniqueName="masterBatchNo">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="processStage" FilterControlAltText="Filter processStage column" HeaderText="processStage" SortExpression="processStage" UniqueName="processStage">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <PopUpSettings ScrollBars="None"></PopUpSettings>
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                   
                </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:projectCopyConnectionString %>" SelectCommand="SELECT [id], [masterBatchNo], [processStage] FROM [PV_Batch]"></asp:SqlDataSource>
    </form>
</body>
</html>
Princy
Top achievements
Rank 2
 answered on 13 Jun 2014
2 answers
116 views
Dear Telerik,

Is it possible to have multiple x-axis label as described in attachment?

Much appreciate for any help.

Thanks!
Danail Vasilev
Telerik team
 answered on 13 Jun 2014
1 answer
173 views
We are getting this error and using Telerik dlls from GAC.  If I go to design mode in .aspx webform and I see the controls but on the page it throws this error.

Error:
http://screencast.com/t/ldNrMHAg

Web.config:
http://screencast.com/t/vIB40g9zxn

http://screencast.com/t/vIB40g9zxn

http://screencast.com/t/t6vqlpTWQv


Danail Vasilev
Telerik team
 answered on 13 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?