Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
398 views
Ok, I hope the topic title is self explanatory, anyway... I have RadToolbar inside a CommandItemTemplate of a RadGrid.
I have a client event tied to the RadToolbar on click (wich checks if grid items are selected otherwise triggers a js alert).
Since I want to use the same function for the multiple grids I have on the page I cannot use $find("<%=GridName.ClientID%>") inside the onclick function. A workaround would be to bind different functions, where I just define the $find("<%=GridName.ClientID%>") for each grid and then  call the main function. But a neater solution would be to retrieve GridName.ClientID inside the function just from JS without resorting to inline asp.net code.
I tryed mangling with the "sender" object (wich is the toolbar triggering the click event) in the function to try to get the parent grid clientID but with no luck.
Any hint?
The structure is this:
<telerik:RadGrid runat="server" ID="GridName"
  <MasterTableView
     <CommandItemTemplate>
        <telerik:RadToolBar OnClientButtonClicking="TheFunction"
....

function TheFunction(sender, args) {
var myGrid = $find("<%=GridName.ClientID%>"); // TO BE RESOLVED WITHOUT EXPLICIT REFERENCE WITH <% %>

Any hint?...


Massimiliano
Top achievements
Rank 1
 answered on 18 Dec 2013
1 answer
99 views
I have created a page that displays an OrgChart and lets the user drilldown. I also let the user generate a PDF of the OrgChart. I am using a third party control to generate the PDF, and have a seperate page that I pass to the PDF generator(That page has less formatting like a printer friendly version). My problem is that although the drilldown works fine on the first page I need to be able to load the second page drilled down the same way. Is there a way to programmatically set the drilldown at load?

Or is there a way to generate an image of the chart, and then I could use that to create the PDF?
Plamen
Telerik team
 answered on 18 Dec 2013
5 answers
397 views
Greetings,

As I mentioned in a previous post, the batch mode grid doesn't store its data in an easily accessible JavaScript data structure, and rather, uses the DOM as a data store, and we want an easy API to read and write cell values.

The BatchEditingManager has getCellValue and changeCellValue methods, but I think they are unreliable in some situations.

changeCellValue doesn't write directly to the table cell. It opens the cell for editing, sets the value, then closes the cell. This behaviour is not acceptable when setting a value to a cell of the currently being edited row. When I call the function, the whole row is closed.
I have scenarios in which I want to change the value of a read only cell when the row is open. For example, I have a grid with two columns, code, and name, with the name cell containing a search box that sets the value of the code cell when the user chooses an item.

At last, I had to write my setCellValue function as follows:

Edge.UI.GridExtensions.setCellValue = function (columnUniquName, dataItem, value)
{
    var tableView = dataItem.get_owner(),
        cell = tableView.getCellByColumnUniqueName(dataItem, columnUniquName);
 
    if(!cell)
        return false;
 
    var valueDiv = cell.querySelector(".rgBatchContainer"),
        valueTextElement = valueDiv? valueDiv.childNodes[0]: null;
 
    if(valueTextElement)
        valueTextElement.textContent = value;
    else if(valueDiv)
        valueDiv.innerHTML = value;
    else
        cell.innerHTML = value;
 
    return true;
}

Which is hacky because it depends on the internal undocumented structure of the grid.
I hope a better alternative will be provided in the future.
Konstantin Dikov
Telerik team
 answered on 18 Dec 2013
5 answers
257 views
Could someone please provide an example of a PivotGrid that has HyperLinked Text? I would be most grateful
Eyup
Telerik team
 answered on 18 Dec 2013
22 answers
224 views
I am have been unable to set up data binding for a SPRadGrid Web Part on a SharePoint 2013 site.  After adding the Web Part, I open 'SPRadGrid Designer'.  The upper treeview shows TelerikSPRadGrid1>MasterTable.  In the lowertree view, MasterTable offers General Settings and Data Binding.  General Settings are all selected.  Under databinding>SQL is SQL Server Instances.  When I click to expand the node, it tells me "the server method 'GetData' failed".  The Excel tab is blank.  Under SharePoint lists, attempting to expand the node (SP Lists) returns the similar error "the server method 'GetSPListData' failed.  

I suspect there is a rather simple explanation for why I cannot bind to data, but I am lost.  Anyone assist?  

Marin
Telerik team
 answered on 18 Dec 2013
2 answers
50 views
Hi,
I have a very small and limited ASP.NET site where i use telerik controls and skins.
The site works fine with all browsers running from Windows, however, many of the MAC OS X users claim that when they reach our site all they can see is a blank white page.
I don't have any css files other than 1 BlackMetroSkin on the entire site.
I couldn't find anything on the forums or google regarding such an issue,
Please assist.
Zeev
Top achievements
Rank 1
 answered on 18 Dec 2013
2 answers
2.1K+ views
I have a RadGrid that has a Master Table and a child and grandchild

Master
     Child
         Grandchild

I am using the OnItemCommand and I can't seem to access the Datakey's that are listed in the Grandchild.
foreach (GridDataItem item in rg1.MasterTableView.Items)
          {
              long Id1 = (long)rg1.MasterTableView.Items[0].GetDataKeyValue("Id1");
                  if (item.HasChildItems)
                  
                      foreach (GridDataItem citem in item.ChildItem.NestedTableViews[0].Items)
                      {
                          string Id = citem.GetDataKeyValue("Id2").ToString();
                      }
                  }
           }


<MasterTableView DataKeyNames="Id1" Name="Master">
            <DetailTables>
                <telerik:GridTableView DataKeyNames="Id1,Id2" Name="Child">
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="Id1,Id2,Id3" Name="Grandchild" EditMode="InPlace">
                            <Columns>

Your help is appreciated.
Mike
Top achievements
Rank 1
 answered on 18 Dec 2013
1 answer
289 views
I've read a number of similar postings in this forum but I'm unable to find one that helps with this...

I have a Default.aspx page (no master page) with a RadAjaxManager and associated RadAjaxLoadingPanel.
On this page I have user controls, one for filters, one for a summary grid, and one for a detail grid.
The flow is that the user makes changes in the filter, clicks Run, and they get data in the summary grid. Click a row in the summary and they get detail.

When the user ticks various options in the filter user control, I see the loading panel in the parent. But not when they click the RadButton.

The user control for the filter has a RadAjaxManagerProxy.
All filter controls including the RadButton are nested in an asp:Panel, which is ajaxified in the proxy via markup.
In order to get the button to trigger an update of the summary or detail user controls in the parent, I use codebehind in Page_Load:

parentPage.AjaxManager.AjaxSettings.AddAjaxSetting(btnRun, parentPage.DetailControl, parentPage.LoadingPanel);
parentPage.AjaxManager.AjaxSettings.AddAjaxSetting(btnRun, parentPage.SummaryControl, parentPage.LoadingPanel);

Again, other controls in this usercontrol / filter activate the loading panel, and clicking the button does update the other user controls with he grids. But the parent loading panel is not activated from the button.

In the above, the parentPage is loaded from the parent/container when this UC is initialized (I could probably have used the Page property...).

Here's the button and related container:
<telerik:RadAjaxManagerProxy ID="RMP1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelCssClass="" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
...
<asp:Panel ID="Panel1" runat="server" Width="1000px">
    <table border="0" style="width: 852px">
...
   <tr>
       <td>
           <div runat="server" id="dExecute" style="margin-top: 20px;">
               <telerik:RadButton ID="btnRun" runat="server" Text="Run" OnClick="btnRun_Click"/>
           </div>
       </td>
   </tr>
    </table>
</asp:Panel>

The parentPage.LoadingPanel is defined in the parent (Default.aspx) as:
public RadAjaxLoadingPanel LoadingPanel
{
    get
    {
        return this.ralp1;
    }
}

After the AddAjaxSetting calls above I do see that the button is ajaxified in the parent manager with the ralp1 loading panel.

For testing purposes I've also added a 5 second delay in the generation of the grid to ensure the loading panel triggers.

It looks like it's wired up, it just doesn't display.

Thanks!
Maria Ilieva
Telerik team
 answered on 18 Dec 2013
1 answer
82 views
hi
 i have a DateTime column with datatype as DateTime. Im performing sorting, but its not sorting correctly.can anyone help?
Shinu
Top achievements
Rank 2
 answered on 18 Dec 2013
1 answer
129 views
hi ..
how to open a window on row double click?i want to get the selected row id along with it.
Princy
Top achievements
Rank 2
 answered on 18 Dec 2013
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?