Spreadsheet click or Doubleclick

0 Answers 43 Views
Spreadsheet
Bassam
Top achievements
Rank 1
Veteran
Bassam asked on 25 Aug 2021, 10:40 PM

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

No answers yet. Maybe you can help?

Tags
Spreadsheet
Asked by
Bassam
Top achievements
Rank 1
Veteran
Share this question
or