Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
379 views
Hello Telerik people,

I would like to have about 8 RadListBoxes on a page and be able to drag and drop an item from one list box to any of the other list boxes. The TransferToID property suggests that I can only have one target, is that correct? If it is possible would you please direct me to an example?

Thanks for your help,

Dave
Princy
Top achievements
Rank 2
 answered on 20 Mar 2014
5 answers
143 views
Hi Team,

I am having a radtreeview in content page and a label in master page.
On selection of tree node in content page I want to update the label text. 

Below is the sample code I am using, but some how the update is not happening.

content page aspx is having: rad tree with RadAjaxManagerProxy.
<telerik:RadTreeView ID="xyz" runat="server" OnClientContextMenuItemClicked="xyz"
                        OnClientContextMenuShowing="xyz" OnClientDoubleClick="xyz"
                        OnClientNodeClicked="xyz" OnClientLoad="AddInfoToMenu" Height="440px">
                        <ContextMenus>
                            <telerik:RadTreeViewContextMenu ID="xyz" runat="server">
                            </telerik:RadTreeViewContextMenu>
                        </ContextMenus>
                    </telerik:RadTreeView>

content page cs contains:
 RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.ClientEvents.OnRequestStart = "RequestInitiated";
        manager.ClientEvents.OnResponseEnd = "RequestEnded";
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);

master page update is happening if I am using a button click. but the node click of handled through ajax request is not updating label control.


Any help appreciated.

thanks
Sabitri
Shinu
Top achievements
Rank 2
 answered on 20 Mar 2014
2 answers
79 views
hello

Just trialling UI for ASP.NET and wanted to check this is correct (apologies if obvious, first time user of Telerik controls).

I add a datasource to  grid and the columns appear automatically and I can format etc

When I add a DetailTable the columns from the datasource appear when I run in the browser, but if I want to format I need to go into the 'Columns' section and Add Bound columns and add the DataField property for each column

I would have through the columns would appear automatically (Available Columns) for the detail in the same way they appear for the MasterTableView

thanks

Graham
Graham
Top achievements
Rank 1
 answered on 20 Mar 2014
4 answers
392 views
Ok I've been struggling with this all day and have been all over this site and forums and can't crack this one. I think the issue is I do not know the proper syntax for the regular expression but not sure. It is a bool field that is populating a GridBoundColumn. The text that appears in the results is "True" or "False"

So the use case is to auto default my grid to show only records where the Active field equals true. The grid was populating successfully everything was working beautifully up until I tired to add the default filter.

(some irrelevant code has been removed for privacy)

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
       AllowPaging="True" CellSpacing="0" GridLines="None" PageSize="25" Skin="Windows7"
       Width="100%" AutoGenerateColumns="False" OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated"
       OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
       OnInit="RadGrid1_Init" OnInsertCommand="RadGrid1_ItemCommand">
       <ExportSettings ExportOnlyData="True" OpenInNewWindow="True" FileName="DataExport"
           IgnorePaging="True" Excel-FileExtension="xls" Excel-Format="ExcelML">
           <Excel Format="ExcelML"></Excel>
       </ExportSettings>
       <MasterTableView IsFilterItemExpanded="True" CommandItemDisplay="Top" >
           <CommandItemSettings ShowAddNewRecordButton="true" ShowExportToExcelButton="True"
               ShowExportToCsvButton="True" AddNewRecordText="Add" />
           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
           </RowIndicatorColumn>
           <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
           </ExpandCollapseColumn>
           <Columns>               
               <telerik:GridBoundColumn DataField="Active" FilterControlAltText="Filter Active column"
                   HeaderText="Active" FilterControlWidth="65%" UniqueName="Active" DataType="System.Boolean">
               </telerik:GridBoundColumn>                
           </Columns>
           <EditFormSettings>
               <EditColumn FilterControlAltText="Filter EditCommandColumn column">
               </EditColumn>
           </EditFormSettings>
       </MasterTableView>
       <FilterMenu EnableImageSprites="False">
       </FilterMenu>
       <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
       </HeaderContextMenu>
   </telerik:RadGrid>

Code behind

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = MyInfo.Get();
  
  
            if (!Page.IsPostBack)
            {
                RadGrid1.MasterTableView.FilterExpression = "(Active = true)";
  
                GridColumn col = RadGrid1.MasterTableView.GetColumnSafe("Active");
                col.CurrentFilterFunction = GridKnownFunction.EqualTo;
                col.CurrentFilterValue = "true";
            }
        }

error message

Server Error in '/' Application.

No property or field 'Active' exists in type 'DataRowView'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Telerik.Web.UI.ParseException: No property or field 'Active' exists in type 'DataRowView'



Additional syntax that has been tried but was also unsuccessful

[Active] = 'true'
[Active] = 'True'
Active = 'true'
Active = True
[Active] EqualTo 'true'
[Active] EqualTo 'True'
[Active] EqualTo true
[Active] EqualTo True

Any help would be great!

~Mike


Sudharshan
Top achievements
Rank 1
 answered on 20 Mar 2014
6 answers
787 views

 

I have a grid where I'm binding data in the needdatasource event, and I'm retrieving a limited selection of records based on the page index. So when they go to the next page, I want to get the next batch of records based on the page size, and when they go back I want to get the previous batch, etc.

The problem I'm seeing is that the NeedDataSource event fires BEFORE the PageIndexChanged event. This means the CurrentPageIndex of the data grid in the NeedDataSource will always be incorrect, since it will always have the old value. I tried testing the RebindReason of the grid to see if I could determine if a page event had caused it, but that always returns ExplicitRebind {4} so it is useless.

How do I figure out what the correct page index is in the NeedDataSource event?

Princy
Top achievements
Rank 2
 answered on 20 Mar 2014
5 answers
150 views
 I am trying to export a telerik gridview to pdf. Although I have managed to do that, I would like to include inside the pdf text like title, or use some values from textboxes inside the aspx page.

I am not sure if the current version of telerik support these actions. Which version of telerik supports these actions and where can I find more information about this if I would like to have this functionality?

What is the code needed for this functionality? so that I can test it with my current version..
Thanks
Princy
Top achievements
Rank 2
 answered on 20 Mar 2014
5 answers
369 views
Hi,

i need the code behind for deleting rows using Telerik gridview. Currently I have the following at the aspx page:
<telerik:GridClientDeleteColumn ConfirmText="Delete row" ButtonType="ImageButton">

what is the method called so that I construct the delete action ? now I am using only the code above - when i delete row disappears but If i do another action I get the error message invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@Page EnableEventValidation="true" %> in a page For security purposes, this feature....

I suspect that the problem is that because I havent inert any code in the code behind file .ascx
which method do I have to implement??

thanks!
Princy
Top achievements
Rank 2
 answered on 20 Mar 2014
1 answer
157 views
Hi,

I am using Radnumericbox like that,

 <telerik:RadNumericTextBox CssClass="app-input" ID="txtUnivaPerfTreshold" runat="server" MaxValue="100" MinValue="1" MaxLength="4" Value="30" EmptyMessage="between %1 - %100" Width="130px" Type="Percent">

When I add EmptyMessage property to radnumerictextbox , on page submit textbox  do auto validation. And red border appears out of textbox. If I dont add empty massage property to radnumerictextbox on page submit textbox is not do autovalidation. I want to use Empty message property but I dont want any validation and red border.

how can I do that?
Shinu
Top achievements
Rank 2
 answered on 20 Mar 2014
1 answer
174 views
hope you can help me, I have the following problem:

I need to export a GRID but sends me the following error

Error de servidor en la aplicación '/SCNUARP'.
--------------------------------------------------------------------------------
 
 
 Referencia a objeto no establecida como instancia de un objeto.
Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.
 
Detalles de la excepción: System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
 
Error de código fuente:
 
 
 
 
Se ha generado una excepción no controlada durante la ejecución de la solicitud Web actual. La información sobre el origen y la ubicación de la excepción pueden identificarse utilizando la excepción del seguimiento de la pila siguiente.
 
 
Seguimiento de la pila:
 
 
 
 
 
[NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.]
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +2186
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +102
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +179
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
  
 
 
--------------------------------------------------------------------------------
Información de versión: Versión de Microsoft .NET Framework:4.0.30319; Versión ASP.NET:4.0.30319.18055

when exporting ExcelML

this is the code I use:

Protected Sub BTExportar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTExportar.Click
       If Hoja.Items.Count > 0 Then
           Hoja.ExportSettings.ExportOnlyData = True
           Hoja.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML
           Hoja.MasterTableView.ExportToExcel()
       End If
   End Sub

Dim Tabla As New DataTable
        Tabla.Columns.Add("CVE")
        Tabla.Columns.Add("seccion")
        Tabla.Columns.Add("indicador")
        Tabla.Columns.Add("criterio")
        Tabla.Columns.Add("si")
        Tabla.Columns.Add("no")
        Tabla.Columns.Add("na")
        Tabla.Columns.Add("avance")
        Tabla.Columns.Add("accion")
        Tabla.Columns.Add("responsable")
 
 Fila(0) = "Clave"
 Fila(1) = Seccion
 Fila(2) = ""
 Fila(3) = ""
 Fila(4) = ""
.
.etc.
 
 Tabla.Rows.Add(Fila)
  Hoja.DataSource = Tabla
  Hoja.DataBind()

this is how I link and exported

I can not export to ExcelML only excel

appreciate your help



Faustino
Top achievements
Rank 1
 answered on 19 Mar 2014
5 answers
94 views
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
 
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
 
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
 
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
 
     <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
 
          <telerik:RadTreeList ID="RadTreeList1" runat="server"
              DataSourceID="SqlDataSource1" ParentDataKeyNames="REPORTS_TO"
              DataKeyNames="EMP_ID" AutoGenerateColumns="False" Width="617px">
 
               <Columns>
 
                    <telerik:TreeListBoundColumn DataField="EMP_ID" UniqueName="EMP_ID" HeaderText="EMP_ID"></telerik:TreeListBoundColumn>
 
                    <telerik:TreeListBoundColumn DataField="REPORTS_TO" UniqueName="REPORTS_TO" HeaderText="REPORTS_TO"></telerik:TreeListBoundColumn>
 
                    <telerik:TreeListBoundColumn DataField="SALES" UniqueName="SALES" HeaderText="SALES"></telerik:TreeListBoundColumn>
 
                     
 
               </Columns>
 
          </telerik:RadTreeList>
 
     </telerik:RadAjaxPanel>
 
     <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT "EMP_ID", "REPORTS_TO", "SALES" FROM "TREE_LIST_TEST""
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

Logan Marshall
Top achievements
Rank 2
Iron
 answered on 19 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?