Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
127 views

Given the following object structure...

    public class CategoryViewModel
    {
            public int category_id {get; set;}

            public string category_name {get; set;}
            public List<CategoryDetailsViewModel> details { get; set; }
    }

    public class CategoryDetailsViewModel
    {
        public string category_detail_id {get; set;}

        public string category_admin {get; set;}
    }

 

Is it possible to use a DetailTable where the details are defined in the parent object? For example, I've tried this, though all the detail tables were empty:

    <telerik:RadGrid runat="server" ID="rgCategories" OnNeedDataSource="rgCategories_NeedDataSource" Skin="Silk" AutoGenerateColumns="false">
        <MasterTableView>
            <DetailTables>
                <telerik:GridTableView Name="Category Details">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="Category Admin" DataTextField="details.category_admin"></telerik:GridBoundColumn>
                    </Columns>
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridBoundColumn HeaderText="Category" DataField="category_name"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

Tyler
Top achievements
Rank 1
 asked on 30 Oct 2017
1 answer
62 views
I have been trying to create a custom sort on a grid on my front end application and the compare function is never called.  I tried running the sample code here to see if I had missed something but that doesn't work either.  Can anyone offer a solution please?  I have tried this in IE11 and the latest version of Chrome with the same result.
David
Top achievements
Rank 1
 answered on 30 Oct 2017
1 answer
258 views
I have this RadComboBox (ddlSrvTypCde) that triggers the radajaxmanager but I don't want the controls on the last <tr></tr> to get affected. I tried putting PostBackControls but it doesn't work.

//
        function centerLoadingPanel(ajaxManager, eventArgs) {
            centerElementOnScreen($get("<%= AjaxLoadingPanel.ClientID %>"));
        }


//


<telerik:RadAjaxManager ID="RadAjaxManager" PostBackControls="txtAFPCde, txtAFPCdeName, ButtonDialogAFPCde, btnAFPCde, txtAFPCdeVal, txtAFPCdeNameVal, txtAFPCdeId" runat="server">
<ClientEvents OnRequestStart="centerLoadingPanel"></ClientEvents>
</telerik:RadAjaxManager>


<asp:Panel ID="pnlAllowed" runat="server" Visible="true">

<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel" PostBackControls="txtAFPCde, txtAFPCdeName, ButtonDialogAFPCde, btnAFPCde, txtAFPCdeVal, txtAFPCdeNameVal, txtAFPCdeId" runat="server" />
<asp:Panel ID="AjaxUpdateStub" runat="server">

<telerik:RadMultiPage runat="server" ID="multiService" SelectedIndex="0" SkinID="RadMultiPageModalForm" Height="315px">
<telerik:RadPageView runat="server" ID="pgeType">
<div class="FormTabSpacer">
<table class="FormHeaderInnerTable">
<tr>
<td>
<table style="width: 500px">
<tr>
<td style="text-align: right; width: 140px;">
<asp:Label ID="lblServiceType" runat="server" Text="Service Type" "></asp:Label>
</td>
<td style="text-align: left; width: 320px;">
<telerik:RadComboBox ID="ddlSrvTypCde" runat="server" Width="317px" TabIndex="3" AutoPostBack="true" CausesValidation="false">
</telerik:RadComboBox>

</td>
</tr>
<tr>
<td class="FormColumnCellLeft">&nbsp;
</td>
<td class="FormColumnCellRight">
<asp:CheckBox ID="chkAllowFractions" runat="server" TabIndex="4" Text="Service"  Style="display: none" />
</td>
</tr>

<tr>
<td class="FormColumnCellLeft">&nbsp;
</td>
<td class="FormColumnCellRight">
<asp:CheckBox ID="chkUseTier" runat="server" Text="Tiered Pricing" TabIndex="6" />
</td>
</tr>

<tr>
<td class="FormColumnCellLeft">&nbsp;
<asp:Label ID="lblAFPCde" runat="server" Text="AFP Code" ></asp:Label>&nbsp;
</td>
<td class="FormColumnCellRight">
<asp:TextBox ID="txtAFPCde" runat="server" Width="50px" ReadOnly="True" SkinID="disabledtextbox"></asp:TextBox>
<asp:TextBox ID="txtAFPCdeName" runat="server" ReadOnly="True" SkinID="disabledtextbox" Width="193px" TabIndex="999"></asp:TextBox>
<input id="ButtonDialogAFPCde" runat="server" name="ButtonDialogAFPCde" style="width: 20px;" type="button" value="..." tabindex="8" />
<asp:Button ID="btnAFPCde" runat="server" SkinID="pickupbutton" Visible="False" TabIndex="999" />
<asp:TextBox ID="txtAFPCdeVal" runat="server" Width="70px" TabIndex="999"></asp:TextBox>
<asp:TextBox ID="txtAFPCdeNameVal" runat="server" Width="220px" TabIndex="999"></asp:TextBox>
<asp:TextBox ID="txtAFPCdeId" runat="server" Width="70px" TabIndex="999"></asp:TextBox>

</td>
</tr>
Vessy
Telerik team
 answered on 30 Oct 2017
1 answer
96 views
I am writing a page that uses a RadEditor for an administrator to create text files.  The other users need to read these files.  Is there a Telerik control that displays rich text or should I make the RadEditor readonly and hide the RadButton? 
Rumen
Telerik team
 answered on 30 Oct 2017
6 answers
870 views

 

 Does anyone know of a way to easily prevent double clicking the next button. e.g. I dont want to charge the user's credit card twice.

 

Any help would be great. Thanks!

Ivan Danchev
Telerik team
 answered on 30 Oct 2017
1 answer
142 views

I have a situation where users need to edit previously entered data, which might not be valid.  For example, assume the valid range for an invoice date is the current month (10/1/2017 to 10/31/2017).  Also assume I have an existing invoice with a date outside that range (11/5/2017).  I'd like to present the invalid value to the user, and have the min/max validation force them to fix it. 

Ideally, I could just set the min, max, and selected values in the code behind, and let the client side validation do it's job.  However, setting the selected date to the invalid date in the code behind throws an exception.  I also tried setting the selected date first, then applying the min/max...but then it changes the selected date based on the min/max.  And the InvalidTextBoxValue is read only, so that's not an option.

 

Is there a way to have the initial date value be an invalid value?  I used the example of a date being outside the min/max range...but in our situation it's possible that the original value wouldn't even be a valid date.  Is there anything built into the control that would help with this situation?  One option would be to not use the built in min/max...and implement my own client side validation to do the range check.  But I view that as a last resort.

 

 

Eyup
Telerik team
 answered on 30 Oct 2017
4 answers
1.5K+ views
Hello,
I have a radgrid with filters and I want my futur users to be able to perform ACCENT INSENSITIVE filtering.

I know this is not implemented in any version of telerik. But my client needs it so I have to do it.

Here's my solution...

In my grid, when a column can contain value with accents, I clone the column, replace all the accents ( é = e, ï = i, ù=u,...), and set the visible property of the cloned column to false (user won't see it).

Now, what i need to do is, when my user filter something, I catch the event using the ItemCommand event, I remove all the accent of the filter value ( i.e. "Pépin" = "Pepin") and perform the search on the hided column and show him the result.

My question is, how can i perform the search on the hided colum. At first, it looked very simple but I can't understand why it doesnt work.

Any help would be appreciated :D
Eyup
Telerik team
 answered on 30 Oct 2017
1 answer
97 views

I have the following code as part of FormTemplate.

<tr>
                                    <td>Body EN:
                                    </td>
                                    <td>
                                        <telerik:RadEditor ID="txtBodyEN" runat="server" Height="400px" Width="100%" ToolsFile="~/Tools.xml" Content='<%# Bind("BodyEN") %>' RenderMode="Lightweight" Skin="MetroTouch" EnableTrackChanges="false" EnableComments="false" EnableViewState="false">
                                        </telerik:RadEditor>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Body DE:
                                    </td>
                                    <td>
                                        <telerik:RadEditor ID="txtBodyDE" runat="server" Height="400px" Width="100%" ToolsFile="~/Tools.xml" Content='<%# Bind("BodyDE") %>' RenderMode="Lightweight" Skin="MetroTouch" EnableTrackChanges="false" EnableComments="false" EnableViewState="false">
                                        </telerik:RadEditor>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td></td>
                                    <td>
                                        
                                        <telerik:RadButton runat="server" ID="btnCancel" Text="Cancel" CommandName="Cancel" Skin="MetroTouch" RenderMode="Lightweight" Icon-PrimaryIconCssClass="rbCancel" UseSubmitBehavior="false" />
                                         
                                        <telerik:RadButton runat="server" ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Save" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Skin="MetroTouch" RenderMode="Lightweight" Primary="true" Icon-PrimaryIconCssClass="rbOk" UseSubmitBehavior="false" />
                                        
                                    </td>
                                </tr>

 

It works fine in IE but in Chrome it throws an exception as soon as you click the cancel button:

System.Web.HttpException: Maximum request length exceeded.

I've tried everything and none of those worked for me. 

Note: if I remove the RadEditor's from there the Cancel button works fine in Chrome too.

Thanks

P.S. I am using a trial (current version)

 

 

Jugoslav
Top achievements
Rank 1
 answered on 30 Oct 2017
1 answer
96 views

I have a radeditor inside a radgrid inside a raddataform. How do I set the image upload path for the radeditor programatically in code-behind (C#)?

 

Rumen
Telerik team
 answered on 30 Oct 2017
4 answers
358 views
Hi everybody,

I am trying to filter a column with multiple selected values.

I use <FilterTemplate> with custom RadComboBox (ComboBox + Checkbox for each line). For example, in column "Language", user can check & select "French" AND "German" in same time.

With the following code, I can easly filter for one language :

    protected void _Default_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        GridFilteringItem filterItem = (GridFilteringItem)RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem)[0]; 
        ViewState["comboValue"] = e.Value; 
        (filterItem["Language"].Controls[1] as TextBox).Text = e.Value; 
        filterItem.FireCommandEvent("Filter", new Pair("EqualTo", "Language")); 
    } 
 

But how can I manage to filter for more than one language ? If I retreive two selected values by user (French + German), how can I configure filterItem ?

Perhaps it is easy to do, but I'm just a novice in Telerik API, so help is really appreciated ...

Thank you


Igor
Top achievements
Rank 1
 answered on 27 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?