Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
I was wondering if you guys could jQuery up a better visualization for drag\drop...Sitefinity has an awesome widget drag\drop visualization (as an example)...so instead of the row with an arrow following the mouse, the place in the tree in which it will place itself contains a placeholder (like dashed border)

Does that make sense?...so we can see in realtime where it'll appear
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 22 Sep 2011
0 answers
156 views
There are 2 scenarios which causes this error.

First scenario:

Selecting a treeview control which is inside the combobox which will cause an ajax process
while a radgrid is within the page and while the code behind are inside a try catch block.
When the code is not in a try catch block, nothing appears.

Second scenario:

Inside a radwindow or normal window(appears using window.open):
Selecting a treeview control which is inside the combobox which will cause an ajax process.
Although this is without a radgrid but error occured, is this due to child window?

I've read some articles about setting something at the web config file but i'm not sure if
its the appropriate solution for me. I'm using version v.2011.2.712.40

Regards,
Dexter
dexter
Top achievements
Rank 1
 asked on 22 Sep 2011
4 answers
140 views
I put the code so please help me with this problem and being able to solve. thanks

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 <%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

 Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>

 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

 <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

    <script language="javascript" type="text/javascript">

     function onRequestStart(sender, args) {

         if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0) {

                 args.set_enableAjax(false);

                 }

       }

 </script>

</telerik:RadScriptBlock>

<table>

<tr>

 <td style="width: 100px; height: 21px">

 <asp:Label ID="LblTituloReporte" runat="server" SkinID="TituloPaginasAdm" Text="Clientes"

 Width="786px"></asp:Label><br />

 <br />

 </td>

 </tr>

 <tr>

 <td>

 <table>

 <tr>

 <td>

 <asp:Label ID="LbClientes" runat="server" CssClass="FormatLabels" SkinID="TitleLabel"

 Text="Cliente" Width="145px"></asp:Label>

 </td>

 <td style="width: 245px">

 <asp:DropDownList ID="DropDownList1Abecedario" runat="server" Font-Names="verdana"

 AutoPostBack="true" Font-Size="10pt" Width="150px" OnSelectedIndexChanged="DropDownList1Abecedario_OnSelectedIndexChanged">

 <asp:ListItem Value="0">----</asp:ListItem>

 <asp:ListItem Value="1">A-C</asp:ListItem>

 <asp:ListItem Value="2">D-F</asp:ListItem>

 <asp:ListItem Value="3">G-I</asp:ListItem>

 <asp:ListItem Value="4">J-L</asp:ListItem>

 <asp:ListItem Value="5">M-O</asp:ListItem>

 <asp:ListItem Value="6">P-R</asp:ListItem>

 <asp:ListItem Value="7">S-U</asp:ListItem>

 <asp:ListItem Value="8">V-Z</asp:ListItem>

 </asp:DropDownList>

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">

 <ContentTemplate>

 <asp:DropDownList ID="DropDownList1Organizador" runat="server" Font-Names="verdana"

 Font-Size="10pt" Width="380px">

 </asp:DropDownList>

 </ContentTemplate>

 <Triggers>

 <asp:AsyncPostBackTrigger ControlID="DropDownList1Abecedario" EventName="SelectedIndexChanged" />

 </Triggers>

 </asp:UpdatePanel>

 </td>

 <td style="width: 99px;">

<telerik:RadButton ID="ImgConsultar" Text="Consultar" runat="server" Skin="Hay" OnClick="ImgConsultar_Click">

 </telerik:RadButton>

 </td>

 </tr>

 <tr>

 <td>

 &nbsp;

 </td>

 <td>

 &nbsp;

 <asp:CheckBox ID="chkVerTodos" Text="Ver todos los clientes" AutoPostBack="true"

 OnCheckedChanged="chkVerTodos_OnCheckedChanged" runat="server" />

 </td>

 <td>

 </td>

 </tr>

 </table>

 <br />

 </td>

 </tr>

 </table>

 <table>

 <tr>

 <td style="width: 121px">

 &nbsp;

 <asp:Label ID="LbTituloCliente" runat="server" CssClass="FormatLabels" SkinID="TituloPaginasAdm"

 Text="Cliente" Visible="false" Width="660px"></asp:Label>

 <asp:Label ID="LbIngresoDatos" runat="server" CssClass="FormatLabels" Enabled="false"

 SkinID="TituloPaginasAdm" Text="Ingreso de datos" Visible="false" Width="160px"></asp:Label>

 </td>

 <td>

 </td>

 <td>

 </td>

 </tr>

 <tr>

 <td>

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 <ClientEvents OnRequestStart="onRequestStart" />

 <AjaxSettings>

 <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">

 </telerik:AjaxSetting>

 <telerik:AjaxSetting AjaxControlID="RadGridHistorico">

 </telerik:AjaxSetting>

 </AjaxSettings>

 </telerik:RadAjaxManager>

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" HorizontalAlign="NotSet"

 Width="1195px">

 <telerik:RadGrid ID="RadGridHistorico" runat="server" Skin="Hay" AllowPaging="True"

 AutoGenerateColumns="False" GridLines="None" AllowFilteringByColumn="True" AllowSorting="True"

 ShowGroupPanel="True" ViewStateMode="Enabled" OnPreRender="RadGridHistorico_OnPreRender">

 <ExportSettings ExportOnlyData="true" FileName="Log clientes" HideStructureColumns="true"

 IgnorePaging="true" OpenInNewWindow="true" />

 <ClientSettings AllowDragToGroup="True">

 </ClientSettings>

 <MasterTableView CommandItemDisplay="Top">

 <CommandItemSettings ShowExportToExcelButton="true" />

 <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">

 </RowIndicatorColumn>

 <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">

 </ExpandCollapseColumn>

 <Columns>

 <telerik:GridBoundColumn AndCurrentFilterFunction="Contains" DataField="NitCliete"

 FilterControlAltText="Filter column column" HeaderText="NitCliete" UniqueName="column">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn AndCurrentFilterFunction="Contains" DataField="NombreCliente"

 FilterControlAltText="Filter column1 column" HeaderText="NombreCliente" UniqueName="column1">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn AndCurrentFilterFunction="Contains" DataField="ModificadoEliminado"

 FilterControlAltText="Filter column2 column" HeaderText="ModificadoEliminado"

 UniqueName="column2">

 </telerik:GridBoundColumn>

 </Columns>

 <EditFormSettings>

 <EditColumn FilterControlAltText="Filter EditCommandColumn column">

 </EditColumn>

 </EditFormSettings>

 </MasterTableView>

 <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">

 </ClientSettings>

 <GroupPanel Text="Arrastre la cabecera de la columna y sueltela sobre esta &#225;rea para agrupar los registros por esa columna.">

 </GroupPanel>

 <FilterMenu EnableImageSprites="False">

 </FilterMenu>

 <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Hay">

 </HeaderContextMenu>

 </telerik:RadGrid>

 </telerik:RadAjaxPanel>

 </td>

 </td>

 </tr>

  </table>

 <table>

  <tr>

 <td style="width: 100px">

 </td>

 </tr>

 </table>

 </asp:Content>

 

ALBERT
Top achievements
Rank 1
 answered on 21 Sep 2011
1 answer
144 views
Hello,

I have created a rad window popup inside of a web page that passes back data to it's parent, very similar to the demo you provide on your website. The code works perfectly fine in my local dev environment (VS2010), however when we test the same code on another web server the radwindow gives an exception stating '...file does not exist'. We added some logging and it seems to be looking for a code behind file that frankly for what purpose we do not understand. It seems to fail on the .Show() method of the radwindow itself as far as we can tell, when looking for this file.

Again the code works fine locally.

Here is how we have the window set up on the parent page:

<telerik:RadWindowManager ID="RadWindowManager1" <br>ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" EnableShadow="True" <br>VisibleTitlebar="true" EnableTheming="True" AutoSize="true" Behaviors="None" Skin="Forest"><br>    <Windows><br>        <telerik:RadWindow ID="rwChemicalCropApplicationRates" runat="server" <br>                            Behaviors="Close, Move"<br>                            OnClientClose="rwChemicalCropApplicationRates_Close"<br>                            NavigateUrl="Dialogs/ModifyCropApplicationRate.aspx" Skin="Telerik"><br>        </telerik:RadWindow><br>    </Windows><br></telerik:RadWindowManager>

On the radwindow itself we just use javascript to pass some of the data back to the parent page.

Again please note this all works perfectly fine in Visual Studio 2010, when we publish the code to another web server this popup (and only this one) does not work.

I am hoping you can help me look in the right direction.

Please let me know what other information, if any, I can provide.

Thank you very much in advance.
Justin
Top achievements
Rank 1
 answered on 21 Sep 2011
7 answers
151 views
http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx.
Hi,
In the link, right top corner of the grid getting blank space(same like in my grid also). please give suggestion how to fill the color in that empty white space. like this happening in version 2011.

Regards
Saravana Kumar
Pavlina
Telerik team
 answered on 21 Sep 2011
8 answers
286 views
Hi,

I'm using a LiteralControl to catch exception errors within the RadGrid. The literal control is added to the bottom of the page, and on a long list of items cannot be seen. Please let me know a setting to add the LiteralControl someplace toward the top of the grid and highlite the line in red. The following is my c# code.

 

 

try

 

{

 

 

BlowDownDataLayer.InsertBlowDownEvents(this.ToString(),

 

 

 

Int32.Parse(RadComboboxPlant.SelectedValue.ToString()),

 

 

 

Int32.Parse(RadComboboxEquip.SelectedValue.ToString()),

 

txtEventDesc.Text.ToString(),

 

 

Int32.Parse(RadComboboxBldGasType.SelectedValue.ToString()),

 

 

 

Int32.Parse((insertedItem["BlowDownEmissionColumn"].Controls[0] as RadNumericTextBox).Text.ToString()),

 

 

 

Int32.Parse((insertedItem["NumberofBlowdownEvents"].Controls[0] as RadNumericTextBox).Text.ToString()),

 

 

 

DateTime.Parse(EventdtTime.SelectedDate.ToString()));

 

}

 

 

catch (Exception ex)

 

{

GridBlowDown.Controls.Add(

 

new LiteralControl("Unable to insert Event. If the problem persists, please contact IT Service Center (x8765)."));

 

e.Canceled =

 

true;

 

}

thanks,
Minh Bui

Andrey
Telerik team
 answered on 21 Sep 2011
3 answers
64 views
I'm having a few problems getting the custom filtering to work. At the moment, I'm getting an error because the SQL Select command string ends up looking like this:

SELECT * FROM WTO_LinkGroups WHERE (Convert.ToString(it["group_name"]) = "3")

The inline code was borrowed from the demo and modified for my needs. Apart from the problem above, it's picking up the ID field in the example above rather than the 'group_name' field. The inline code is this:

<telerik:GridBoundColumn DataField="group_name" HeaderText="Group Name" SortExpression="group_name"
                        UniqueName="group_name">
                        <FilterTemplate>
                            <telerik:RadComboBox runat="server" ID="GroupNameComboBox" DataSourceID="SqlDataSource1"
                                DataTextField="group_name" DataValueField="group_id" Height="200px" AppendDataBoundItems="true"
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("group_name").CurrentFilterValue %>'
                                OnClientSelectedIndexChanged="GroupNameIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                <script type="text/javascript">
                                    function GroupNameIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("group_name", args.get_item().get_value(), "EqualTo");
 
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        </FilterTemplate>
                    </telerik:GridBoundColumn>

Oh ... and here's the codebehind:

protected void RefreshCombos()
    {
        SqlDataSource1.SelectCommand = "SELECT * FROM WTO_LinkGroups WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();
        SqlDataSource1.SelectCommandType = System.Web.UI.WebControls.SqlDataSourceCommandType.Text;
        RadGrid1.MasterTableView.Rebind();
    }

The error crops up on the Rebind.

Where is the problem being caused?

Thanks.
Daniel
Telerik team
 answered on 21 Sep 2011
1 answer
298 views
Greetings,

I was able to get the RadComboBox to work with autocomplete by loading all of the distinct rows from my sql datatable for a certain column and returning them all at once. Naturally with a lot of values it was very slow, but none the less it worked. Knowing this wouldnt be ok for production I began digging into the LoadOnDemand demo's, specifically this one:
http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx

I used the demo almost verbatim in my code as I want it to work like the server side example. However when I click my combobox it shows the first 10 items (or whatever I set it to) but when I start typing in lettters it goes to "Loading.." and unless the value is in that first set of 10 it won't autocomplete. Basically it has to be in the ItemsRequested set in order to autocomplete. Is it possible to autocomplete with large data sets without having to load every item into the combobox?

(sorry for the long post, I figured more detail is better than less). Any help is appreciated.

btw FillComboBox() just returns my query string..

My Control:
<telerik:RadComboBox ID="ddlRadComboBox" Runat="server"
            EmptyMessage="Enter a skill name" 
                MarkFirstMatch="True"
                MaxLength="200" ShowDropDownOnTextboxClick="True" 
                OnItemsRequested="ddlRadComboBox_ItemsRequested" 
                EnableVirtualScrolling="True" ItemsPerRequest="10"
                ShowMoreResultsBox="true" EnableLoadOnDemand="True"
                 />

private DataTable GetData(string text)
        {
            try
            {
                //using() requires no close()
                using (connection = new SqlConnection(ConnectionString))
                {
                    //open connection to db
                    connection.Open();
  
                    //change command query based on dropdown
                    myCommand = new SqlCommand(FillComboBox(), connection);
                    using (adapter = new SqlDataAdapter(myCommand))
                    {
                        comboBoxDT = new DataTable();
                        adapter.Fill(comboBoxDT);
  
                        return comboBoxDT;
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
  
            return comboBoxDT;
        }

protected void ddlRadComboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    DataTable data = GetData(e.Text);
    int itemOffset = e.NumberOfItems;
    int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);
    e.EndOfItems = endOffset == data.Rows.Count;
    for (int i = itemOffset; i < endOffset; i++)
    {
        ddlRadComboBox.Items.Add(new RadComboBoxItem(data.Rows[i]["SkillName"].ToString(), data.Rows[i]["SkillName"].ToString()));
    }
}
Christopher
Top achievements
Rank 1
 answered on 21 Sep 2011
2 answers
88 views
I have a radgrid with a hierarchy and I have it set so the child table has grouping enabled. It works fine except that I would like the rows to be collapsed after the grouping selection is made. How do I go about making that happen? Thanks for any help.

I'm using version Q2 2011 and a the grid is bound to a sqldatasource
AkAlan
Top achievements
Rank 2
 answered on 21 Sep 2011
2 answers
101 views
Hi guys,

I am using Telerik radchart in my web application and the chart is populated from a datasource.

The X-axis is AutoScale = false and Y-axis is AutoScale = true.

I was wondering if there is a way to have only 10 items marked on the Y-axis at all times.

radchart1.PlotArea.YAxis.MaxItemsCount = 10; does not seem to work.

Let me know if you need more information.

Thanks in advance.

Rushma
Top achievements
Rank 1
 answered on 21 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?