Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views

Hello,

   We upgraded our controls and now our toolbar buttons are moved to a drop down button to the right.  There is plenty of room for our buttons, but they still go into the menu.  I've attached a screenshot.

Marin Bratanov
Telerik team
 answered on 19 Jan 2018
25 answers
1,000 views
Is there a way to have the system create automatic page breaks as opposed to creating a single paged PDF document.  I was hoping to maybe use this as an option to export a page to a PDF report but the text cuts off because it's larger than a single A4 page.  I'm guessing that is beyond the scope of this but thought it was worth asking.

Thanks,

Richard
Rumen
Telerik team
 answered on 19 Jan 2018
7 answers
368 views
Hi,
I am using the aggregate function of the Telerik. see code below)

<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="Categoria" />
<telerik:GridGroupByField FieldName="RiskValue" Aggregate="Avg" HeaderText="Valore medio di rischio" />
</SelectFields>                                    
<GroupByFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="categoria" />
</GroupByFields>                                   
</telerik:GridGroupByExpression>  
</GroupByExpressions>          

Is it possible to sort the columns according to the value of the aggregate function (average)?

Kind regards,

Dario Zanelli
Eyup
Telerik team
 answered on 19 Jan 2018
1 answer
290 views

The drop down list is populated with values, but when they are selected nothing happens to the table.

I am trying to iterate through the column, get the distinct values and add them to a filter.

It works when i Add a new asp:SqlDataSource with a distinct sql statement, then add datasourceID, datavalue and datatext to the ComboBox, but need to get this working programmatically.

Column:

<telerik:GridBoundColumn DataField="OperationalTypeName" HeaderText="OperationalTypeName" SortExpression="OperationalTypeName">
                    <FilterTemplate>
                        <telerik:RadComboBox ID="operationtypeComboBox" runat="server" RenderMode="Lightweight"
                            SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("OperationalTypeName").CurrentFilterValue %>'
                            OnClientSelectedIndexChanged="OpertationalTypeIndexChanged">
                        </telerik:RadComboBox>

                        <telerik:RadScriptBlock runat="server">
                            <script type="text/javascript">
                                function OpertationalTypeIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("OperationalTypeName", args.get_item().get_value();, "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
               </telerik:GridBoundColumn>

 

ItemDataBound:

    protected void GridView1_ItemDataBound(object sender, GridItemEventArgs e)
    {
         if (e.Item is GridFilteringItem)
        {
            GridFilteringItem item = (GridFilteringItem)e.Item;
            RadComboBox combo = (RadComboBox)item.FindControl("operationtypeComboBox");
            //combo.Items.Add(new RadComboBoxItem("ALL"));
            foreach (var filter in filterOperationalType())

//filterOperatiionType returns the correct list

           {

                combo.Items.Add(new RadComboBoxItem(filter, filter));

// they are added to the ComboBox but do not work, the html generated is exactly the same as the filter options that work through using DataSourceID used on the ComboBox.
            }
        }        
    }

    private List<string> filterOperationalType()
    {

        DataView view = (DataView)this.SqlDataSource1.Select(DataSourceSelectArguments.Empty);
        List<string> list = new List<string>();
        foreach (DataRow item in view.Table.Rows)
        {
            list.Add(item.ItemArray[1].ToString());
        }
        var a = list.Distinct().ToList();
        return a;
    }

 

 

Thank you

Attila Antal
Telerik team
 answered on 19 Jan 2018
7 answers
126 views

In Chrome and IE the clicking of the SELECT button for the uploads is kinda difficult when using MATERIAL skin, see attached screenshot.

The cursor becomes caret when hovering the button's text and clicking it is not always working.

This not the case when we try the same at RadAsyncUpload itself so maybe something to do with IFRAME use?

Marc
Rumen
Telerik team
 answered on 19 Jan 2018
20 answers
1.7K+ views
Hi,

How can I get / extract the values (text) out of the e.Item.DataItem-Object in an UpdateCommand of a RadGrid?

Here a screenshot which I made while debugging: http://www.pronux.ch/grid.JPG


Thanks for your help.

Mike




Eyup
Telerik team
 answered on 19 Jan 2018
6 answers
399 views

 

I have a RadGrid that uses a GridTemplate column along with two Gridbutton columns called Edit and Delete .When I click on Edit to edit a particular record,  all my textboxes and combo boxes get filled from the grid column as these fields are also visible as the grid columns.In Edit panel ,we have also one treeview with checkboxes, which should populate with some checkboxes as checked  depending on the dataset. Here our problem started.We are not able to set checkboxes as checked.While dubugging, I observed that it is making the nodes as checked depending on dataset data but still it is not showing in the page.  

protected

 

 

void radTreeview_Load(object sender, EventArgs e)

 

{

 

RadTreeView radSelectPartner;
try
{
  radSelectPartner = (
RadTreeView)sender;
  if (radSelectPartnerNodes.Count == 0)
{
    DataSet dtatable = (DataSet)Session["SelectPartner"];
    radSelectPartner.DataTextField =
"Partner Name";
    radSelectPartner.DataValueField =
"OrdID";
    radSelectPartner.DataFieldID =
"OrdID";
    radSelectPartner.DataFieldParentID =
"ParentID";
    radSelectPartner.DataSource = dtatable;
      if (ViewState["ContactEmail"] != null)
     {
     DataSet dsSelectParners = chkitems(ContactEmail);
     for (int count = 0; count < dsSelectParners.Tables[0].Rows.Count; count++)
     {
     if (dsSelectParners.Tables[0].Rows[count][0].ToString() != null)
         {
            foreach (RadTreeNode radNode in radSelectPartner.GetAllNodes())
              {
                radNode.Checkable =
true;
                 // for checking only child node.Currently RadTreeView depth is 2.
                 if (radNode.Level != 0 && radNode.Level != 1)
                      {
                         if (radNode.Value.ToString() == dsSelectParners.Tables[0].Rows[count][1].ToString())
                               {
                                radNode.Checked =
true;
                               }
                       }
                 }
             }
          }

 

Brijkumar
Top achievements
Rank 1
 answered on 19 Jan 2018
2 answers
303 views
I am using an asmx webservice to serve up JSON mapping data to the RadCLientDataSource, then binding in MapLayer, yet I am having no success in getting the control to plot the markers.  I have tested the basics like is it serving up a staic JSON (using the demo JSON files) and this works. (So not an issue with the web.config file).  I have also confirmed using Fiddler that the JSON file is being served up correctly (it is correctly parsed in the JSON tab of fiddler, and I have no d schema requirements). So as far as I can see have a clean structured, zero error, JSON file being sent to the browser.

I have then set the LocationField='Location' in the maplayer where Location is the JSON filed and this is an array of Latitude/Longitude values.  Therefore I am stumped, as there are no examples of serving the mapping file via a webservice I wondering if it simply does not work.  Any thoughts please, or any suggestions how I can debug why the data is not being mapped ?

As stated it works fine with a static file - but when using asmx file I cannot get it to work.

Here is the RadClientDataSource code
<telerik:RadClientDataSource runat="server" ID="RadClientDataSourceCustomers">
    <DataSource>
        <WebServiceDataSourceSettings>
            <Select DataType="JSON" Url="http://localhost:62671/Customers.asmx/GetCustomers?iCountry=6"  ContentType="application/json; charset=utf-8" RequestType="Get" />
        </WebServiceDataSourceSettings>
    </DataSource>
</telerik:RadClientDataSource>

Here is the MapLayer code
    <telerik:MapLayer Type="Marker" Shape="pin" ClientDataSourceID="RadClientDataSourceCustomers" LocationField="Location">
    <TooltipSettings AutoHide="false" Width="300"
                     Template="<div class='COntainer'><div class='cusName'>#= marker.dataItem.CustomerName #</div></div>">
        <AnimationSettings>
            <OpenSettings Duration="300" Effects="fade:in" />
            <CloseSettings Duration="200" Effects="fade:out" />
        </AnimationSettings>
    </TooltipSettings>
</telerik:MapLayer>

Any thoughts or examples would be useful.
Mohammed
Top achievements
Rank 2
 answered on 19 Jan 2018
2 answers
362 views

I'm trying to fetch the ClientID for a RadGrid control from client side using JavaScript so that I'll be able to bind data to this from the client side.
The RadGrid is present within the RadLightBox and needs to be populated on a button click event. The markup for LightBox looks something like this.
<telerik:RadLightBox ID="RadLightBox1" runat="server">

<Items><telerik:RadLightBoxItemrunat="server"><ItemTemplate><telerik:RadGrid runat="server" ID="lightbox_radgrid"AutoGenerateColumns="false"><MasterTableView><Columns><%-- Columns not shown here --%> </Columns></MasterTableView><ClientSettings><ClientEvents OnCommand="window_radgrid_OnCommand"/></ClientSettings><GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" /></telerik:RadGrid></ItemTemplate></telerik:RadLightBoxItem></Items></telerik:RadLightBox>

This is the partial Javascript Code that I have written. I am able to find upto the RadLIghtBoxItem element but unable to fetch the RadGrid and it's clientID. This method is to be executed on success of a call to a web service to return the data.
function

onSucessCallThis(result, userContext, methodName)

{

 var radWindow = $find('<%= lightbox.ClientID %>');var LightBoxItems = radWindow.get_items(); console.log(LightBoxItems); console.log(LightBoxItems.get_count());var item = LightBoxItems.getItem(0); console.log(item); //Able to fetch LightBoxItemvar radGrid = item.FindControl("lightbox_radgrid"); //Doesn't work

}

I'm not sure if this is the right way to have a radGrid inside a radLightBox. There isn't many examples of this online.

If the code is unreadable here please check this stackoverflow question

http://stackoverflow.com/questions/38481200/finding-the-client-id-for-a-radgrid-inside-a-radlightboxitem-tag-in-a-radlightbo

Frank
Top achievements
Rank 1
 answered on 19 Jan 2018
0 answers
165 views

hi all

i have a formview with radgridview inside of it this grid with client side click event  after i apply RadAjaxManager its not work 

 

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" UpdateInitiatorPanelsOnly="True">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="claimformview">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl   ControlID="claimformview" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
        </AjaxSettings>
    </telerik:RadAjaxManager>

 <telerik:RadAjaxLoadingPanel RenderMode="Lightweight"  runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel>

<asp:FormView ID="claimformview" runat="server" Width="100%" DataKeyNames="CID" DataSourceID="ClaimDB" OnItemCommand="claimformview_ItemCommand" OnDataBound="claimformview_DataBound">
             
            
            <ItemTemplate>

<script type="text/javascript">
        function printV(id, rowIndex) {
          
             var grid = $find("<%= claimformview.FindControl("RadGrid2").ClientID %>"); 
            var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
            grid.get_masterTableView().selectItem(rowControl, true);

            window.radopen("Fileviwer.aspx?FileNo=" + id, "RadWindow1");
            return false;
        }
        
         

       
        </script>

 <telerik:RadGrid ID="RadGrid2" RenderMode="Lightweight" runat="server" Width="50%" DataSourceID="filedb" AutoGenerateColumns="False" CellSpacing="-1" GridLines="Both" OnItemCreated ="RadGrid2_ItemCreated">
                                                
                                                <ClientSettings>
                                                    <Selecting AllowRowSelect="True"></Selecting>

                                                    <Scrolling   UseStaticHeaders="True"></Scrolling>
                                                </ClientSettings>
                                                <MasterTableView DataKeyNames="FileNo" DataSourceID="filedb">
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="FileNo" ReadOnly="True" HeaderText="FileNo" SortExpression="FileNo" UniqueName="FileNo" DataType="System.Int32" FilterControlAltText="Filter FileNo column"></telerik:GridBoundColumn>
                                                         <telerik:GridBoundColumn DataField="Ext" HeaderText="Ext" SortExpression="Ext" UniqueName="Ext" FilterControlAltText="Filter Ext column"></telerik:GridBoundColumn>
                                                      
                                                     <telerik:GridTemplateColumn HeaderText="View" Exportable="False" UniqueName="stores" AllowFiltering="False" AllowSorting="False" Groupable="False">
                    <ItemTemplate>
                        <asp:HyperLink ID="EditLink" runat="server" Text="View" ImageUrl ="../Content/img/Preview32x32.png"></asp:HyperLink>
                    </ItemTemplate>
                             <HeaderStyle Width="50px" /> 
                                                         <ItemStyle Width="50px"/>
                                                         <FooterStyle Width="50px" />
                </telerik:GridTemplateColumn> 
                                                    </Columns>
                                                </MasterTableView>

                                            </telerik:RadGrid>

  </ItemTemplate>
                            </asp:FormView>

 

 

protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
                editLink.Attributes["href"] = "javascript:void(0);";
                editLink.Attributes["onclick"] = String.Format("return printV('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["FileNo"], e.Item.ItemIndex);
            }
        }

 

arkan
Top achievements
Rank 2
Iron
 asked on 19 Jan 2018
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?