Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
246 views
How to bring the Export to Excel icon from right position to left position of the grid?
Kostadin
Telerik team
 answered on 24 Nov 2014
14 answers
514 views

Hello,

I'm using the following to provide checkboxes for row selection in one of my grids:

<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">  
    <HeaderStyle Width="20px"></HeaderStyle> 
</telerik:GridClientSelectColumn> 

I'd like to be able to filter the contents of the grid based upon whether or not a row is selected.  E.g. display all rows, only those selected, or only those not selected.  I'm figuring it's not as simple as just setting AllowFilteringByColumn="true", but would like to know if it's possible through built-in means or if I have to do it through some custom code.  As simple as this seems, I couldn't find anything about it in the forums.

Currently, when setting AllowFilteringByColumn to true, I get the filter boxes on all of my other columns, but nothing on this one as for filter options.

I'm using Q32008 .NET 3.5 version of the controls.

Any help is greatly appreciated.
Thanks in advance,
Marty
Maria Ilieva
Telerik team
 answered on 24 Nov 2014
11 answers
249 views
Hi,

I am trying to open a radwindow from radgrid edit link template field . This is done from clientclick script I mean as follows
OnClientClick="return windowopen();"  but the thing is , I have 4 records as of now. the radwindow needs to get displayed appropriately beneath each row.
I mean if it is first row , the window should get opened below that. if it is 4th row , or nth row the window should get opened beneath that.


Kindly help.


-Thanks
Gayathri
Konstantin Dikov
Telerik team
 answered on 24 Nov 2014
1 answer
78 views
I have a RadScheduler that displays multiple resources on a single view (DayView). Is there a way to control the ability to add/edit/delete appointments within a single resource independent of the other resources? I have security that I want to apply and I cannot figure out how to do it. Something like a Readonly at the Resources level or AllowInsert at that level.
Boyan Dimitrov
Telerik team
 answered on 24 Nov 2014
1 answer
159 views

I am creating one entry screen using RadGrid in Batch Edit Mode. My Grid is having mainly some columns of ComboBox (rdcombPayCodeNm) and  TextBox ("txtHours" or "txtAmount"). I have added attribute like "PaidInAmount"/"PaidInHours" in RadCombo in PageLoad.  I want to verify textBox value based on user selected item and their attribut value of ComboBox. Suppose user selected one item in combo and their attribute value is  "PaidInAmount" then user should not enter any value in "txtHours" textbox and opposite if user selected combobox attribute is "PaidInHours" then there should be any value in "txtAmount" textbox. There would be multiple row in grid and I have to validate one by one row and show message to user. I want to perform this operation in client side as I can't read grid value in server side in BatchEdit mode.

I am copying my aspx code and code behind for your ref.

ASPX
------------------------------------------------------------------
<telerik:RadGrid ID="rdgvOtherPay" runat="server" AllowAutomaticInserts="True" AllowAutomaticUpdates="true" AllowMultiRowEdit="true" AllowPaging="True"
    AutoGenerateColumns="False" CellSpacing="0" OnNeedDataSource="rdgvOtherPay_NeedDataSource"
    GridLines="None"
    PageSize="12" AllowMultiRowSelection="true">
    <ClientSettings>
        <ClientEvents OnBatchEditSetEditorValue="setEditorValue" OnRowCreated="rowCreated" OnBatchEditOpened="editOpened" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText=""
        CommandItemSettings-CancelChangesText="" CommandItemSettings-RefreshText="" CommandItemSettings-ShowRefreshButton="false"
        CommandItemSettings-ShowSaveChangesButton="false" CommandItemSettings-ShowCancelChangesButton="false" DataKeyNames="idEmpOtherPay"
        Dir="rtl" EditMode="Batch" HorizontalAlign="NotSet" InsertItemDisplay="Bottom">
        <BatchEditingSettings EditType="Row" />
        <SortExpressions>
            <telerik:GridSortExpression FieldName="idEmpOtherPay" SortOrder="Descending" />
        </SortExpressions>
        <Columns>
            
            <telerik:GridTemplateColumn DataField="PayCodeId" HeaderStyle-Width="110px" HeaderText="Pay Code" UniqueName="PayCodeId">
                <ItemTemplate>
                    <%# Eval("PayCodeName") %>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="rdcombPayCodeNm" runat="server" class="TelerikDrop" dir="ltr" DropDownAutoWidth="Enabled" Filter="StartsWith" TabIndex="8"
                         >
                        <Items>
                            <telerik:RadComboBoxItem Text="PayCodeName1" />
                            <telerik:RadComboBoxItem Text="PayCodeName2" />
                        </Items>
                    </telerik:RadComboBox>
                    <span style="color: red; font-size: larger; vertical-align: bottom">
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="OtherHours" HeaderStyle-Width="90px" HeaderText="Hours" UniqueName="OtherHours">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblOtherHours" Text='<%# Eval("OtherHours") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadNumericTextBox ID="txtHours" runat="server" MaxLength="15" Width="80%">
                        <NumberFormat DecimalDigits="2" GroupSeparator="" />
                    </telerik:RadNumericTextBox>
                    <%--<ajax:popupcontrolextender id="PopupControlExtender1" runat="server" popupcontrolid="Panel1" position="Bottom" targetcontrolid="txtHours" />--%>
                    <span style="color: red; font-size: larger; vertical-align: bottom">
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            
            <telerik:GridTemplateColumn DataField="OtherAmount" HeaderStyle-Width="90px" HeaderText="Amount" UniqueName="OtherAmount">
                <ItemTemplate>
                    <%# Convert.ToDouble(Eval("OtherAmount")).ToString("0.00") %>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadNumericTextBox ID="txtAmount" runat="server" MaxLength="15" Width="80%">
                        <NumberFormat DecimalDigits="2" GroupSeparator="" />
                    </telerik:RadNumericTextBox>
                    <span style="color: red; font-size: larger; vertical-align: bottom"></span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridButtonColumn ConfirmText="Delete Other Earnings?" ConfirmDialogType="RadWindow"
                ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
            </telerik:GridButtonColumn>
        </Columns>
        <PagerStyle Mode="NumericPages" ShowPagerText="False" />
    </MasterTableView>
</telerik:RadGrid>



Code Behind-


            foreach (PayCodeDO _row in payCodeList)
            {
                RadComboBoxItem item = new RadComboBoxItem
                {
                    Value = _row.PayCodeId.ToString() + " " + _row.Description,
                    Text = _row.Description,
                };
                // string noOfHours = Convert.ToString(_row.PaidInAmount);
                item.Attributes.Add("PaidInAmount", _row.PaidInAmount);
                item.Attributes.Add("PaidInHours", _row.PaidInHours);
                item.Attributes.Add("PaidInHrAndAm", _row.PaidInHourseAndAmount);
                payCodeCombo.Items.Add(item);
            }

            payCodeCombo.Items.Insert(0, new RadComboBoxItem(""));



Thank in Advance.

Regards,
Anil

Angel Petrov
Telerik team
 answered on 24 Nov 2014
3 answers
146 views
Hi all,
   Could someone help me with this issue...  I'm wanting to code the AllowedFileExtensions on the server side or make it dymanic...

Code behind:
radAsyncUpload1.AllowedFileExtensions = "doc.docx,pdf.xls".Split(',');

doesn't seem to be working and it fails on the client end.

But when I it's in the control like this it work...

<telerik:RadAsyncUpload ID="radAsyncUpload1" runat="server" AllowedFileExtensions="doc,docx,pdf,xls" />

based on this http://demos.telerik.com/aspnet-ajax/asyncupload/examples/validation/defaultcs.aspx.
Hristo Valyavicharski
Telerik team
 answered on 24 Nov 2014
1 answer
39 views
I have a load-on-demand combobox set with a custom OnItemRequested handler.  The user can start typing a part of a client name, email, address, etc and the custom code will go do a select on the database and return items.

The problem I am having is that IF the items returned from the database do not include the typed text - they are not displayed in the dropdown.  I have set Filter="none" but that does not seem to help.

For Example: I type in ABC - the database finds a match - returns it - and it is databound to the combobox.  However ABC is not actually in the DataTextField or DataValueField - nor is it in any of the fields displayed in the <ItemTemplate> of the dropdown.  In this case, the line does not display.

Is there a workaround for this?  
Nencho
Telerik team
 answered on 24 Nov 2014
2 answers
83 views
Hello,

I'm using a RadGrid with EditForms. I find that when I use GridDropDownColumn, I get a js error generated by telerik's dynamic code when calling the grid edit form.
If I take GridDropDownColumns out of my grid, everything works fine. Even if I'm using a generic GridDropDownColumn with no datafield, I still get the error.

I can't figure out what's causing this, as it worked the day before and I haven't changed anything.

Here's the error message:

Line: 6
Error: Object doesn't support property or method 'toUpperCase'

Here's my grid:

<telerik:RadGrid runat="server" ID="gridMedications" OnItemDataBound="gridMedications_ItemDataBound" OnInsertCommand="gridMedications_InsertCommand" OnDeleteCommand="gridMedications_DeleteCommand" >
    <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<i><b>None - Not taking any medications</b></i>"
        CommandItemDisplay="Bottom" EditMode="EditForms" >
        <CommandItemSettings AddNewRecordText="Add Medication" ShowAddNewRecordButton="true" ShowRefreshButton="false" />
        <EditFormSettings EditColumn-InsertText="Add" EditColumn-ButtonType="PushButton" />
        <Columns>
            <telerik:GridBoundColumn DataField="NameOfMed" HeaderText="Medication" UniqueName="NameOfMed" >
                <ColumnValidationSettings EnableRequiredFieldValidation="true">
                    <RequiredFieldValidator SetFocusOnError="true" Display="Dynamic" ForeColor="Red" Text=" *Required" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ReasonForTaking" HeaderText="Reason for Taking" UniqueName="ReasonForTaking" DefaultInsertValue="" />
            <telerik:GridBoundColumn DataField="FormOfMed" HeaderText="Form Of Medication" UniqueName="FormOfMedCol" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="Prescription" HeaderText="Rx or OTC" UniqueName="PrescriptionCol" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="ForAllergies" HeaderText="For Allergies?" UniqueName="ForAllergiesCol" ReadOnly="true" />
            <telerik:GridDropDownColumn DataField="FormOfMed" HeaderText="Form Of Medication" UniqueName="FormOfMed" Visible="false" ReadOnly="false" />
            <telerik:GridDropDownColumn DataField="Prescription" HeaderText="Rx or OTC" UniqueName="Prescription" Visible="false" ReadOnly="false" />
            <telerik:GridDropDownColumn DataField="ForAllergies" HeaderText="For Allergies?" UniqueName="ForAllergies" Visible="false" ReadOnly="false" />
 
            <telerik:GridButtonColumn ButtonType="LinkButton" Text="Remove" CommandName="Delete" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Maria Ilieva
Telerik team
 answered on 24 Nov 2014
5 answers
187 views
Hello all,

I have really two problems, but they are connected to each other, so I will explain both in this thread. 

Problem 1 - Loading panel - Master Page

I have been at this for a while, and even though I am following the code sample from here: http://www.telerik.com/help/aspnet-ajax/ajax-show-loadingpanel-on-initial-pageload.html the Loading Panel is not working.

Code for Main.Master:

<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
 
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                $find("<%=RadAjaxManager1.ClientID%>").ajaxRequest("InitialPageLoad");
            }
        }
.....


<form id="form1" runat="server">
         
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="MainContentPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
......


        <div id="mainContent">
            <section class="container-content">
                <div class="bottom-container-content">
                    <div class="content-page">
 
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
                        <asp:Panel ID="MainContentPanel" runat="server">
                            <asp:Panel ID="AjaxMainContentPanel" runat="server" Visible="false">
                                <asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
                            </asp:Panel>
                        </asp:Panel>
 
.......

Code for Main.Master.vb:

Private Sub RadAjaxManager1_AjaxRequest(sender As Object, e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
 
    If e.Argument = "InitialPageLoad" Then
        AjaxMainContentPanel.Visible = True
    End If
 
End Sub


Symptoms:

Although the page seems to load in the correct order, master and content page layout, menus, images, etc... the RadAjaxLoadingPanel does not show. 
I have a RadGrid on the content page being loaded from some very heavy queries which can take up to 5 seconds, and the place where the grid would show is blank until the data is loaded. 


Problem 2 - RadGrid's NeedDataSource event will not fire with the above scenario:


 Code for Content.aspx:

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
     
    <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="AjaxManagerProxy1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdList" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
    <telerik:RadGrid ID="rdList" runat="server" AllowPaging="False" Skin="Silk" AllowMultiRowSelection="true" AutoGenerateColumns="false">
        <MasterTableView>
            <Columns>
 
.....

Code for Content.aspx.vb:
Private Sub rdList_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rdList.NeedDataSource
 
    LoadGrid()
 
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
    If Not Page.IsPostBack Then
 
 
    Else
        If PageIsLoaded.Value <> "true" Then
            rdList.Rebind()
            PageIsLoaded.Value = "true"
        End If
    End If
 
End Sub


Symptoms:

On the initial page load (I haven't gotten to the point where I have any PostBack on the Content page yet), the NeedDataSource event will not fire.
The solution I found was to call the Grid's Rebind() method on the Content page's Page_Load method. However, I am not sure that this is correct. To me it seems an unnecessary action. And I had to use a Hidden Field so that I could check whether or not it's been called so that I don't do any unnecessary rebinds, and it only happens on the initial page load.

Can anyone help?

Thanks!!!




















Maria Ilieva
Telerik team
 answered on 24 Nov 2014
1 answer
62 views
The 2014Q3 release brought about the edit popup dialog.
Will there be any chances to add customn properties to this (and hide default ones)?

Bozhidar
Telerik team
 answered on 24 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?