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

Hi
Sorry for the constant inconvenience
I have problem that I would like to help find solution .
I want to make an event click or Doubleclick On Spreadsheet above
It is filled Spreadsheet  in below with the specified data
Attached picture 2
I tried a lot and worked the following code
It still does not display data
I don't know where the problem is

<telerik:RadScriptBlock runat="server" >
     <script type="text/javascript">

  function pageLoadHandler() {
                    var spreadsheet = $find("<%= RadSpreadsheet_ProjectPart.ClientID %>");
                    var value = $get("<%= HD_ProjectPart.ClientID %>").value;
                    var valueAsJSON = JSON.parse(value);
                    spreadsheet.get_kendoWidget().fromJSON(valueAsJSON);

                 var spreadsheet2 = $find("<%= RadSpreadsheet_WBS.ClientID %>");
                    var value2 = $get("<%= HDWBS.ClientID %>").value;
                    var valueAsJSON2 = JSON.parse(value2);
                    spreadsheet2.get_kendoWidget().fromJSON(valueAsJSON2);
                }

                Sys.Application.add_load(pageLoadHandler);

       function OnClientClicked(sender, args) {                
                    var value = args.get_range().get_value()
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(value);                     
       }
             function OnClientChange(sender, args) {
                    var spreadsheet = $find("<%= RadSpreadsheet_ProjectPart.ClientID %>");
                    var jsonstring = JSON.stringify(spreadsheet.get_kendoWidget().toJSON());
                    $get("<%= HD_ProjectPart.ClientID %>").value = jsonstring;
             }
               function OnClientChange2(sender, args) {
                    var spreadsheet = $find("<%= RadSpreadsheet_WBS.ClientID %>");
                    var jsonstring = JSON.stringify(spreadsheet.get_kendoWidget().toJSON());
                    $get("<%= HDWBS.ClientID %>").value = jsonstring;
             }
         </script>
    </telerik:RadScriptBlock> 

  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   EnableViewState ="true"    OnAjaxRequest="RadAjaxManager2_AjaxRequest"  ></telerik:RadAjaxManager>

                                                                                                                                

  <telerik:RadSpreadsheet ID="RadSpreadsheet_ProjectPart"    OnClientChange="OnClientChange"  OnClientSelect ="OnClientClicked"     runat="server" RowsCount="40" ColumnsCount ="3" RowHeaderWidth ="30" ColumnHeaderHeight ="0" Width ="100%" Height ="290px"  ColumnWidth="100"    >

  </telerik:RadSpreadsheet>

  <asp:HiddenField ID="HDWBS" runat="server" EnableViewState ="true"  />

                                                                                                                                

     <telerik:RadSpreadsheet ID="RadSpreadsheet_WBS"   EnableViewState ="true"   runat="server" RowsCount="5" ColumnsCount ="4" RowHeaderWidth ="30" ColumnHeaderHeight ="0" Width ="100%" Height ="290px"  ColumnWidth ="260"  >

                                                                </telerik:RadSpreadsheet>

 

  Protected Sub RadAjaxManager2_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
        Dim DT As New DataTable
        Dim workbook = New Telerik.Web.Spreadsheet.Workbook()
        DT = GetProject_WBS2(e.Argument)
        workbook.Sheets = GetSheets_WBS(DT)
        Dim json = workbook.ToJson()
        HDWBS.Value = json
    End Sub

 

I'm working on an application

Asp.net


Kind regards

Bassam
Top achievements
Rank 1
Veteran
 asked on 25 Aug 2021
1 answer
223 views

Has anyone had any success implementing the built-in filtering capabilities of RadGrid (no server or client-side code) when setting the rendermode of the RadGrid to Mobile?

I find that the filtering is inconsistent or doesn't work at all in Mobile mode, but if I switch to Lightweight, it works perfectly. Also, for a GridDateTimeColumn, the filtering dialog is confusing. I'm not sure how you would specify a range using "Between" in Mobile mode.

The target for this application is a tablet, so I have been using the "Mobile" render mode throughout, but I may need to use the "Lightweight" option for this radGrid as filtering will be important to the end user.

If anyone has any experience with this or has any suggestions, I would appreciate it.

Again, all I'm doing is changing the rendermode from "Mobile" to "Lightweight" and that solves all of the issues.

Thanks!

Vessy
Telerik team
 answered on 25 Aug 2021
2 answers
407 views

Hi friends

I want to use a RadGrid with Grouping, as shown on this page:

https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/grouping/defaultvb.aspx

But the data for this grid is inside a datatable.

Is there any way to build this grid without using SqlDataSource?

Thanks

See you

Walter
Top achievements
Rank 1
Iron
 updated answer on 25 Aug 2021
1 answer
216 views

Hi,

I have been struggling with this issue for some time.  Here is the problem.  When the page is first loaded, the splitter is displaying half of the content as in step1.jpg.  However when I resize the browser width or height just tiny bit, the splitter is displaying the entire content occupying the entire page as in step2.jpg.

<telerik:RadSplitter runat="server" ID="Splitter" Width="100%" OnClientLoaded="SplitterLoaded" Height="95%">
    <telerik:RadPane runat="server" ID="LeftPane" Scrolling="Both">
        <!-- left pane is loaded dynamically -->
    </telerik:RadPane>
    <telerik:RadSplitBar runat="server" ID="SplitBar" CollapseMode="Both" />
    <telerik:RadPane runat="server" ID="RightPane">
        <!-- right pane is loaded dynamically -->
    </telerik:RadPane>
</telerik:RadSplitter>

The content in the splitter is loaded dynamically using "knockout" js library.  Is there a way to resize the splitter to display the entire content as in step2.jpg when the page is loaded?

Please let me know if you need more information.  I really appreciate any help from you.

Vessy
Telerik team
 answered on 24 Aug 2021
1 answer
423 views

How to clear RadChat Messages in javascript? I tried clear and it didnt work

<telerik:RadChat runat="server" ID="RadChat1" Height="400px">
                <MessagesSettings Placeholder="Enter message here" />
</telerik:RadChat>

 

var radChat = $find("<%=RadChat1.ClientID %>");
radChat.clear()

 

 

Rumen
Telerik team
 answered on 24 Aug 2021
0 answers
144 views

Hi

I have encounter an issue when reordering with a RadTabStrip.

There is a radWindow on the page and if you click on a tab to reorder, then move it over the RadWindow and unclick then the tab will remain over the Window.

If you then click on the TabStrip again then the tab will remain orphaned.  Sometimes clicking the the relevant tab will make the tab disappear, sometimes it doesn't.

Jarrod Craik
Top achievements
Rank 1
 asked on 24 Aug 2021
1 answer
244 views

Hi I am trying to virtualize my radmulticolumn combobox however after virtualization I am unable to select any of the items in the combobox it doesnt select the item whenever i click to select it just closes the dropdown.

The client side Onselect event triggers but doesnt hold  a selected Item-The server side on itemSelctedindexchanged event doesnt fire at all.

it is bound to a Datatable..

here is my code

Thanks alot

       <telerik:RadMultiColumnComboBox ID="accDropDown"
                        runat="server" CssClass="multiColumn"
                        AutoPostBack="true" DataTextField="AccountName"
                        DataValueField="AccountId" AllowPaging="true"
                        Filter="Contains" Width="420px" OnSelectedIndexChanged="accDropDown_SelectedIndexChanged"
                        Font-Size="14px" CausesValidation="false" ForeColor="#666666" FilterFields="AccountName,AccountNumber"
                        Delay="0" Placeholder="Select An Account.." EnableServerFiltering="true"
                        EnableServerPaging="true" Enable="true" ClientEvents-OnSelect="ItemSelected"  EnableViewState="true">
                        <ColumnsCollection>
                            <telerik:MultiColumnComboBoxColumn Field="AccountName" Title=" Account Name" Width="300px" />
                            <telerik:MultiColumnComboBoxColumn Field="AccountNumber" Title="Account Number" />
                        </ColumnsCollection>
                        <VirtualSettings ItemHeight="25" ValueMapper="valueMapper" />


                    </telerik:RadMultiColumnComboBox>


<script>
     function valueMapper(options) {

          
            $telerik.$.ajax({
                url: "https://demos.telerik.com/kendo-ui/service/Orders/ValueMapper",
                type: "GET",
                dataType: "jsonp",
                data: convertValues(options.value),
                success: function (data) {
                    options.success(data);
                }
                  
            })

        }

        function convertValues(value) {
            var data = {};
            value = $telerik.$.isArray(value) ? value : [value];

            for (var idx = 0; idx < value.length; idx++) {
                data["values[" + idx + "]"] = value[idx];
            }

            return data;
        }</script>

Vessy
Telerik team
 answered on 24 Aug 2021
0 answers
140 views

Hi,

I am trying to get single hierarchy expand in radgrid but I am unable to achieve it.

Below is my aspx code

<telerik:RadGrid RenderMode="Lightweight" Skin="Outlook" ID="RadGrid1"  OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource"
          OnPreRender="RadGrid1_PreRender"   runat="server" AutoGenerateColumns="false" PageSize="10" AllowPaging="True" HierarchyLoadMode="ServerBind">

             <MasterTableView DataKeyNames="TrackID" AllowMultiColumnSorting="True">
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="TrackID" Name="coms_opportunities" Width="100%">
                                 <Columns>
                                    <telerik:GridBoundColumn SortExpression="SvcTag" HeaderText="Svc tag" HeaderButtonType="TextButton"
                                        DataField="SvcTag">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn SortExpression="FiscalQuarter" HeaderText="Fiscal Quarter" HeaderButtonType="TextButton"
                                        DataField="FiscalQuarter">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn SortExpression="Region" HeaderText="Region" HeaderButtonType="TextButton"
                                        DataField="Region">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn SortExpression="SubRegion" HeaderText="Sub Region" HeaderButtonType="TextButton"
                                        DataField="SubRegion">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton"
                                        DataField="Country">
                                    </telerik:GridBoundColumn>
                                </Columns>
                        </telerik:GridTableView>
                        </DetailTables>
                         <Columns>
                    <telerik:GridBoundColumn SortExpression="COMSTtackerID" HeaderText="COMSTtackerID" HeaderButtonType="TextButton"
                        DataField="COMSTtackerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="OpptyName" HeaderText="Oppty Name" HeaderButtonType="TextButton"
                        DataField="OpptyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="CustomerName" HeaderText="Customer Name" HeaderButtonType="TextButton"
                        DataField="CustomerName">
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn SortExpression="PartnerName" HeaderText="Partner Name" HeaderButtonType="TextButton"
                        DataField="PartnerName">
                    </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn SortExpression="ForecastAmtUSD" HeaderText="Forecast Amt USD" HeaderButtonType="TextButton"
                        DataField="ForecastAmtUSD">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ForecastStatus" HeaderText="Forecast Status" HeaderButtonType="TextButton"
                        DataField="ForecastStatus">
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn SortExpression="ExpectedCloseDate" HeaderText="Expected Close Date" HeaderButtonType="TextButton"
                        DataField="ExpectedCloseDate">
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn SortExpression="TagsCount" HeaderText="Tags Count" HeaderButtonType="TextButton"
                        DataField="TagsCount">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            </telerik:RadGrid>

.cs file:

   protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        if (!e.IsFromDetailTable)
        {
            RadGrid1.DataSource = GetOppty();
        }
    }  protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

        {


                        string TrackID = dataItem.GetDataKeyValue("TrackID").ToString();
                        e.DetailTableView.DataSource = GetTags("@Ctr");
          
        }
    }
 protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RadGrid1.MasterTableView.Items[0].Expanded = true;
           // RadGrid1.MasterTableView.Items[0].ChildItem.NestedTableViews[0].Items[0].Expanded = true;
        }
    }
}
Shweta
Top achievements
Rank 1
 asked on 20 Aug 2021
1 answer
122 views

Hi,

I have a modal RadWindow, whose content page contains a RadEditor.   When an editor dialog is opened, it's position and movement is limited to the content area of the RadWindow.  Is there a way to have the editor dialogs open modal, but relative to the browser?  Thus allowing the editor dialog to be positioned overlapping or even outside of the RadWindow.

Thanks,

Dave

 

Vessy
Telerik team
 answered on 19 Aug 2021
1 answer
153 views
Is it possible to change the DateInput-Label for my RadDatePicker using javascript?
Vessy
Telerik team
 answered on 19 Aug 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?