Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
5.6K+ views
i have to change the grid column header text dynamically according to the combo text selected text.
I tried to change in pre render event,  data bound etc . No changes affcted. but when post back again the header text changed .. Can you please help about this?
 
Jason
Top achievements
Rank 1
 answered on 16 Oct 2019
5 answers
191 views

     We have a menu built in code-behind, the focus key works and we can move from menu item to item horizontally with arrows but there doesnt seem to be a way to access the dropdown items. WAVE for the demo (attached) shows "Tab" but WAVE on our menu does not (attached). here is the markup

     <telerik:RadMenu ID="RadMenu2" runat="server" Flow="Horizontal" BorderWidth="1px"
                    Style="z-index: 10; width: 100%; white-space: normal;" Skin="Bootstrap"
                    Font-Names="Verdana" Font-Size="X-Small" EnableRoundedCorners="false" RenderMode="Lightweight"
                    EnableAriaSupport="true" CommandKey="Alt" FocusKey="B" KeyboardNavigationSettings-FocusKey="B">
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </telerik:RadMenu>

 

david
Top achievements
Rank 1
 answered on 16 Oct 2019
1 answer
182 views

Hi Guys,

 

Using the upload control for Azure Blob Storage.

Using ASP.NET AJAX radCloudUpload v 2019 R3.  I select a file to upload then get the following exception:

 

[FormatException: Invalid length for a Base-64 char array or string.]
   System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) +12707288
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +130
   System.Convert.FromBase64String(String s) +42
   Microsoft.WindowsAzure.Storage.Auth.StorageCredentials.UpdateKey(String keyValue, String keyName) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Auth\StorageCredentials.cs:259
   Microsoft.WindowsAzure.Storage.Auth.StorageCredentials..ctor(String accountName, String keyValue, String keyName) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Auth\StorageCredentials.cs:184
   Telerik.Web.UI.AzureProvider.EnsureWebClient() +100
   Telerik.Web.UI.CloudUploadHandler.EnsureWorker() +681
   Telerik.Web.UI.CloudUploadHandler.ProcessRequest(HttpContext context) +182
   Telerik.Web.UI.HandlerRouter.ProcessHandler(String handlerKey, HttpContext context) +92
   Telerik.Web.UI.HandlerRouter.ProcessHandler(HttpContext context) +54
   Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context) +39
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
   System.Web.&lt;&gt;c__DisplayClass285_0.&lt;ExecuteStepImpl&gt;b__0() +26
   System.Web.StepInvoker.Invoke(Action executionStep) +101
   System.Web.&lt;&gt;c__DisplayClass4_0.&lt;Invoke&gt;b__0() +22
   Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.OnExecuteRequestStep(HttpContextBase context, Action step) +64
   System.Web.&lt;&gt;c__DisplayClass284_0.&lt;OnExecuteRequestStep&gt;b__0(Action nextStepAction) +54
   System.Web.StepInvoker.Invoke(Action executionStep) +85
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +9980649
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +71
</pre></code>

 

Any help appreciated.

Thanks,

Joe

 

 

 

Vessy
Telerik team
 answered on 16 Oct 2019
3 answers
370 views

I have a radbutton in a CommandItemTemplate and I want to be able to set it invisible. I am going to use Active Directory to do a check to see who is using the application and hide the button for basic users. But right now I am just trying to hide the button in the PreRender sub. I am getting an error 'Index was outside the bounds of the array' error.

    <div class="divColumn100">
        <asp:Button ID="HiddenButton" runat="server" Text="HiddenButton" OnClientClick="HiddenButton_Click" Style="display: none;" />
        <telerik:RadToggleButton ID="btnToggleActiveInactive" runat="server" Width="96%" AutoPostBack="true">
            <ToggleStates>
                <telerik:ButtonToggleState Text="Active Drivers" Selected="true" />
                <telerik:ButtonToggleState Text="In-Active Drivers" />
                <telerik:ButtonToggleState Text="Both Active and In-Active Drivers" />
            </ToggleStates>
        </telerik:RadToggleButton>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" IsSticky="true" InitialDelayTime="1000">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="rdwinDrivers" runat="server"></telerik:RadWindowManager>


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel2"EnablePageHeadUpdate="False" UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="HiddenButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdgrdDrivers" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdgrdBirthDaysMonthly"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rfltMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdgrdDrivers" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rghcMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdgrdDrivers" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div id="demo" class="demo-container no-bg">
        <telerik:RadGrid ID="rdgrdDrivers" runat="server" Skin="Office2010Blue" AutoGenerateColumns="False" AllowPaging="True" PageSize="14" DataSourceID="dsDrivers"
            AllowSorting="True" AllowAutomaticUpdates="True" ShowStatusBar="true" AllowFilteringByColumn="true">
            <GroupingSettings CaseSensitive="false" />
            <SelectedItemStyle CssClass="MySelectedClass" />
            <MasterTableView DataSourceID="dsDrivers" CommandItemDisplay="Top" DataKeyNames="EMP_ID" EditFormSettings-PopUpSettings-KeepInScreenBounds="true" EditMode="PopUp">
                <CommandItemTemplate>
                    <telerik:RadButton ID="btnAddEmp" runat="server"  Text="Add New Employee" CommandName="InitInsert"></telerik:RadButton>
                </CommandItemTemplate>

                <AlternatingItemStyle CssClass="MyRowClass" />
                <EditFormSettings EditFormType="Template">
                </EditFormSettings>

                <Columns>

 

I have this is the PreRender to set the button visible=False.


   Private Sub EmployeeInformation_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
        Dim commandItem As GridCommandItem = CType(rdgrdDrivers.MasterTableView.GetItems(GridItemType.CommandItem)(0), GridCommandItem)
        Dim btn As Button = CType(commandItem.FindControl("btnAddEmp"), Button)
        btn.Visible = False
    End Sub

Vessy
Telerik team
 answered on 16 Oct 2019
3 answers
146 views
Hello,

Can I change the radgrid design in order to display the editform above the columns names (Plaese view the attached image)?
Here is my code:
<telerik:RadGrid ID="TasksRadGrid" runat="server" PageSize="20" AllowFilteringByColumn="false" ValidationGroup="NewTaskValidationGroup"
                        GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="700px"
                        ShowStatusBar="true" OnPreRender="TasksRadGrid_PreRender" OnNeedDataSource="TasksRadGrid_NeedDataSource" OnUpdateCommand="TasksRadGrid_UpdateCommand" OnInsertCommand="TasksRadGrid_InsertCommand" OnDeleteCommand="TasksRadGrid_DeleteCommand">
                        <MasterTableView GridLines="None" Width="700px" CommandItemDisplay="Top" DataKeyNames="TID">
                            <CommandItemSettings AddNewRecordText="<%$ Resources:GeneralTelerikResource, TelerikRadGridAddNewRecordText %>"
                                                    RefreshText="<%$ Resources:GeneralTelerikResource, TelerikRadGridRefreshText %>" />
                            <Columns>
                                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn1"  ItemStyle-VerticalAlign="Top" EditText="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditColumnText %>">
                                </telerik:GridEditCommandColumn>
                                <telerik:GridTemplateColumn UniqueName="Status"  ItemStyle-VerticalAlign="Top" ItemStyle-Width="10%" HeaderStyle-Width="10%" HeaderText="Status" DataField="Status">
                                   <ItemTemplate>
                                       <asp:Image ID="StatusImage" ImageUrl="~/Common/Design/Imgs/Tasks/Statuses/New.png" ToolTip="New" Width="20px" Height="20px" runat="server" />
                                   </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn UniqueName="Priority"  ItemStyle-VerticalAlign="Top" ItemStyle-Width="10%" HeaderStyle-Width="10%" HeaderText="Priority" DataField="Priority">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Title"  ItemStyle-VerticalAlign="Top" ItemStyle-Width="35%" HeaderStyle-Width="35%" HeaderText="Title" DataField="Title">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Comment"  ItemStyle-VerticalAlign="Top" ItemStyle-Width="30%" HeaderStyle-Width="30%" HeaderText="Comment" DataField="Comment">
                                </telerik:GridBoundColumn>
                                 
                                <telerik:GridDateTimeColumn UniqueName="EndDate"  ItemStyle-VerticalAlign="Top" ItemStyle-Width="15%" HeaderStyle-Width="15%" HeaderText="EndDate" DataField="EndDate">
                                </telerik:GridDateTimeColumn>
                                 <telerik:GridButtonColumn ConfirmText="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnConfirmText %>"  ItemStyle-VerticalAlign="Top" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnConfirmTitle %>" ButtonType="ImageButton" CommandName="Delete" Text="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnText %>"
                                    UniqueName="DeleteColumn">
                                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                </telerik:GridButtonColumn>
                            </Columns>
                            <EditFormSettings UserControlName="~/OU/Tasks/c/CreateTask/SubUserControl.ascx" EditFormType="WebUserControl">
                                <EditColumn UniqueName="EditCommandColumn1">
                                </EditColumn>
                            </EditFormSettings>
                        </MasterTableView>
                    </telerik:RadGrid>

Please, I need your help,
It is appreciated to send me the modified code.

Regards,
Bader 
Eyup
Telerik team
 answered on 16 Oct 2019
1 answer
136 views

Is it possible to have two sliders that adjust each other's values automatically client-side?

So both sliders have values 0 - 100 and if slider 1's value is adjusted to 60 then slider's value automatically becomes 40 (i.e. slider 2 value = 100 - slider 1 value and slider 1 value = 100 - slider 2 value)

Eyup
Telerik team
 answered on 16 Oct 2019
1 answer
201 views

I have a Radgrid that when the EditCommandColumn button is clicked I load a WebUserControl.

                                                                       <EditFormSettings  UserControlName="BudgetItemControl.ascx" EditFormType="WebUserControl">
                                                                            <EditColumn UniqueName="EditCommandColumn1">
                                                                            </EditColumn>
                                                                            <PopUpSettings Modal="false" />
                                                                        </EditFormSettings>

 

On the WebUserControlI have the following bound field...

                            <telerik:RadNumericTextBox ID="txtQty" runat="server"  Text='<%# DataBinder.Eval(Container, "DataItem.Qty") %>' DisabledStyle-                 

                                BackColor="Transparent" 
                                EmptyMessage="Enter qty" Enabled="true" Font-Names="Arial" Font-Size="Small" ForeColor="#666699" MinValue="0"

                                RenderMode="Lightweight" 
                                Skin="Silk" TabIndex="7" Type="Number" Value="0" Width="190px" Visible="true"
                                onkeyup="javascript: onChange();" onkeypress="return isFloatNumber(this,event);" >

On the form with the grid I have the javascript OnChange() event

when I try to get_value

var txt=$find("<%= RadGrid1.ClientID%>").get_masterTableView().get_dataItems()[1].findControl("txtqty")

I receive the following error: Cannot read property 'findControl' of undefined.

I can get the value when using an asp control.

var txt1 = document.getElementById("TextBox2").value; (THIS WORKS)

How can I get the RadNumericTextBox value?

 

 

 

 

 

Eyup
Telerik team
 answered on 16 Oct 2019
25 answers
2.6K+ views
Hi,
I am using a Radgrid which allows the columns to be sorted and a sort icon is displayed when a column is sorted. If the same column is clicked to sort continuously for 3 times, the sort icon is not being shown the third time. Also the fourth time I click the same column, there is no change in the sorting order. Is there a third state other than asc and desc?  The demos in telerik site also displays the same behaviour.
Given below is the code snippet for SortCommand handler:

Select

 

Case e.OldSortOrder

 

 

Case GridSortOrder.None, GridSortOrder.Descending

 

BindResults(pindex,

e.CommandArgument & " asc")

 

 

Exit Select

 

 

Case GridSortOrder.Ascending

 

BindResults(pindex,

e.CommandArgument & " desc")

 

 

Exit Select

 

 
Any help in this regard is greatly appreciated.

Thanks
PMR.
Eyup
Telerik team
 answered on 16 Oct 2019
1 answer
156 views

 we have a one column grid of GridButtonColumn and when the user arrows to a row we need the user to "click" the button with a keyboard. A "return" and a spacebar does not work?

  <telerik:RadGrid ID="RadGrid2" runat="server" HorizontalAlign="Center"
                    DataSourceID="SqlDataSource2" OnItemCommand="RadGrid2_ItemCommand"
                    PageSize="30" Width="99%" CellSpacing="0" Skin="Bootstrap" AllowAutomaticUpdates="false" AllowAutomaticInserts="false"
                    EnableAriaSupport="true">
                    <ClientSettings EnableRowHoverStyle="True" AllowKeyboardNavigation="true" KeyboardNavigationSettings-FocusKey="Z" KeyboardNavigationSettings-AllowSubmitOnEnter="true">
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <MasterTableView CommandItemDisplay="None" Width="100%" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
                        <Columns>
                            <telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="ProgramName" CommandName="SelectProgram" HeaderText="Program Name (Click to Select)" ></telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="ProgramCode" FilterControlAltText="Filter ProgramCode column" HeaderText="ProgramCode" SortExpression="ProgramCode" UniqueName="ProgramCode" Display="false">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                    </MasterTableView>
                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                    <FilterMenu EnableImageSprites="False"></FilterMenu>
                    <HeaderContextMenu></HeaderContextMenu>
                </telerik:RadGrid>

Attila Antal
Telerik team
 answered on 15 Oct 2019
1 answer
258 views

I have a Radspreadsheet with 13 columns. I need to create a datatable with the grid content and send it to a stored procedure. When I paste 8000+ rows in the grid everything works fine on local host, but it doesn't seem to be able to create the datatable when I deploy on the server. Could it be that the data size is too big to be sent to the server? Is there anyway to overcome this problem?

I have two javascript methods: one to automatically save the grid content after pasting data in the grid, and one to format grid content as text. 

Here are the two JS methods:

        function OnClientChange(sender, eventArgs) {
            //call save automatically when posting any data in the grid
            var sheet = $find('<%=RadSpreadsheet1.ClientID%>');
            sheet.save();
        }

        function onclientpaste(sender, args) {

             //format data as text
            var clipboardData = args.get_clipboardContent().data;
            for (var i = 0; i < clipboardData.length; i++) {
                for (var j = 0; j < clipboardData[i].length; j++) {
                    var cellData = clipboardData[i][j];
                    cellData.format = "@"
                }
            }
        }

Here is the Radspreadsheet code:

<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1" OnClientChange="OnClientChange" onclientpaste="onclientpaste">

Peter Milchev
Telerik team
 answered on 15 Oct 2019
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?