Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.8K+ views
Hello,

i'm using Telerik aspnet controls for first-time so probably i'm missing something.
I have a RadComboBox with a DataSource linked by code.

I need to clear its items also in code-behind.

I have tried the following

cboExample.DataSource = null;
cboExample.DataBind();

But items remain in combobox.

Which is the way to clear items in RadComboBox?

Do i have to do cboExample.Items.Clear(); explicitly?

Thanks
Malkiat
Top achievements
Rank 1
 answered on 15 Jul 2013
1 answer
95 views
I have a radasyncupload control that works just fine when I deploy it to Azure, but not in the local debug environment.

The progress bar fills all the way up and then sticks right at the end and does nothing.

Screen shot attached.
Peter Filipov
Telerik team
 answered on 15 Jul 2013
1 answer
129 views
Hello,
I have to export data from a RadGrid to Excel, but I want to hide the other icons, but I can not hide the separator, as I can do?

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)

{

if (e.Item is GridCommandItem)

{

GridCommandItem cmditm = (GridCommandItem)e.Item;

//to hide AddNewRecord button

cmditm.FindControl("InitInsertButton").Visible = false;//hide the text

cmditm.FindControl("AddNewRecordButton").Visible = false;//hide the image

//to hide Refresh button

cmditm.FindControl("RefreshButton").Visible = false;//hide the text

cmditm.FindControl("RebindGridButton").Visible = false;//hide the image

// cmditm.FindControl("Separator").Visible = false;





thanks
Shinu
Top achievements
Rank 2
 answered on 15 Jul 2013
1 answer
88 views
Hi,

I have just download a trial version of Telerik Reporting. I tried to integrate it with SharePoint 2010 however, reading the the system requirements it only works with .NET 4.0. Obviously SharePoint 2010 only works within the .NET 3.5 app domain. 

Wondering if I can get an earlier version of the package or has support for SharePoint 2010 been discontinued?

Thanks,
Nigel
Blajka
Telerik team
 answered on 15 Jul 2013
1 answer
78 views
  1. Grid is defined in markup
  2. But the grid columns are added dynamically after the data is fetched from database onNeedDataSource
  3. I had to set the EnableViewState to false since the grid columns are created dynamically
  4. When a different page in the grid is selected, Grid.PageIndex is always returning 0 even when the paging is enabled. Why?
  5. To solve the above issue, I tried to add OnPageIndexChanged event to the grid. But this event is never getting called when a different page is selected in grid. Why? Does this not work when ViewState is disabled?
Can you please explain how to make the PageIndex to return the appropriate page selected?
Andrey
Telerik team
 answered on 15 Jul 2013
1 answer
119 views
Hello, im using sqldatasource to select the datas and configure to the schedular. However, the schedular did not show any datas.
Below are my codes and i've attach my table image:
deafult.aspx
<asp:SqlDataSource ID="SqlDataSourceSchedule" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT classDetailsID,cd.classID,classType,startDate,endDate,batch,leftSlot FROM ClassDetail cd INNER JOIN Class c ON cd.classID=c.classID WHERE locationID=1 AND batch=2">
    </asp:SqlDataSource>
    
    <br/><br/><br/><br/><br/>
    <telerik:RadScheduler ID="RadScheduler1" runat="server"
            SelectedView="MonthView" DataEndField="endDate" DataKeyField="classDetailsID" 
        DataSourceID="SqlDataSourceSchedule" DataStartField="startDate" 
        DataSubjectField="classType" Height="" SelectedDate="2013-07-15" 
        EditFormDateFormat="d/M/yyyy" EditFormTimeFormat="h:mm tt" 
        EnableCustomAttributeEditing="True">
         <AdvancedForm Modal="True" EnableCustomAttributeEditing="True"></AdvancedForm>                
                 <AppointmentTemplate>
                    <div class="rsAptSubject">
                        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                         <%# Eval("classType") %>
                    </div>
                  
               </AppointmentTemplate>
             <TimeSlotContextMenuSettings EnableDefault="True"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="True"></AppointmentContextMenuSettings>
    </telerik:RadScheduler>
Shinu
Top achievements
Rank 2
 answered on 15 Jul 2013
1 answer
268 views
I have auto generated columns in my radgrid and i'm trying to enable column filtering on enter key press. when i type search text and press enter i'm getting the following error.
Uncaught TypeError: Cannot read property 'value' of null
<telerik:RadGrid ID="gridSearchL3" runat="server" AllowPagg="True" 
             GridLines="None" Height="415px" 
             OnNeedDataSource="RadGrid1_NeedDataSource"
            Font-Names="Eras Medium ITC" Font-Size="Small" PageSize="50" 
             AllowFilteringByColumn="True"
           
             AllowSorting="True" ShowStatusBar="True" AllowPaging="True" CellSpacing="0" 
                oncolumncreated="gridSearchL3_ColumnCreated1" onitemcommand="gridSearchL3_ItemCommand" 
                >
               <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="XX-Small" />
               <GroupingSettings CaseSensitive="False" />
            <ExportSettings Excel-Format="ExcelML" ExportOnlyData="True" 
                FileName="PinC Group" IgnorePaging="True" OpenInNewWindow="True">
                <Excel Format="ExcelML" />
            </ExportSettings>
            <ClientSettings>
              
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    
            </ClientSettings>
            <AlternatingItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <GroupHeaderItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <SortingSettings EnableSkinSortStyles="false" /> 
            <MasterTableView  Font-Names="Eras Medium ITC" 
                   Font-Size="X-Small">
           
                <CommandItemSettings  ExportToPdfText="Export to Pdf" />
                 
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
             
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
                <ItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            </MasterTableView>
            <EditItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <FooterStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <HeaderStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
            <FilterItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <CommandItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <ActiveItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <ItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <PagerStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                   HorizontalAlign="Left" Mode="NextPrevNumericAndAdvanced" />
               <SelectedItemStyle Font-Names="Eras Medium ITC" Font-Size="X-Small" />
               <FilterMenu Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                 EnableRoundedCorners="True">
               </FilterMenu>
               <HeaderContextMenu Font-Names="Eras Medium ITC" Font-Size="X-Small" 
                   Skin="Simple">
               </HeaderContextMenu>
               </telerik:RadGrid>

code behind:

public void setSqlDatSource()
    {

        gridSearchL3.DataSource = getsource();

    }


public DataTable getsource()
    {
        string Query;

        Query = @"select distinct h.DocumentNumber 'Document Number' " +
                 " from tblDocumentHeader h    where  h.DocumentHeaderTypeID=3 ";

        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["PinCBusMgtDocs.Properties.Settings.PINCConnectionString"].ConnectionString);
        DataTable dt = new DataTable();
        using (SqlDataAdapter da = new SqlDataAdapter(Query, con))
        {
            
            da.Fill(dt);
        }

        return dt;
    }


protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {

      setSqlDatSource();
  
    }

    protected void gridSearchL3_ColumnCreated1(object sender, GridColumnCreatedEventArgs e)
    {
       if (e.Column.UniqueName == "Document Number")
        {
            e.Column.FilterControlWidth = 120;
            e.Column.HeaderStyle.Width = Unit.Pixel(120);
            e.Column.AutoPostBackOnFilter = true;
            e.Column.CurrentFilterFunction = GridKnownFunction.Contains;
         }
     
        }

             
    }





































































 
Jayesh Goyani
Top achievements
Rank 2
 answered on 15 Jul 2013
2 answers
110 views
Hello,
I have a pie chart in a user control, in an aspx page.  When I view this page all is as it should be.
However, the aspx page is in an iFrame in a multipage and this causes display problems.
When the outer page is loaded or resized each iFrame is resized to the height of the screen ($(window).innerHeight() less an allowances for the tabstrip..
For the HTMLChart the 5 item legend is displayed on one line as per the image attached.
There is also a problem with the display of a grid on the same page.  The grid is set to a height of 250px but when it has more data and needs to scroll it is not contained within the 250px height. Setting the height of this iFrame containing this page to the actual height of the user control (852px)does not fix the problem.
If the user control is in the multipage the display is correct, so it appears to be the iFrame causing the problem.
I need to use iFrames as there may be more dashboards added to the top page in coming months and I think they will blow the page size through the roof. There are already 3 dashboards in the lineup.
Joan
Top achievements
Rank 1
 answered on 15 Jul 2013
1 answer
140 views
I am trying to configure my SQLDatasource for use with a RadGrid.  The RadGrid has a FormTemplate for use in Insert and Updates.  The database is in a SQL Server 2008 R2 server. The data selection process works fine however I am having an issue with the Insert process.  If I configure the datasource for Insert by selecting a stored procedure the setup brings in all of the Insert stored procedure parameters correctly. When I try the Insert process I receive a SQL error "System.Data.SqlClient.SqlException: Procedure or function usp_WorkPackageInsert has too many arguments specified." Even though they match exactly.  Then I tried to change the SQLDatasource to use TEXT and include the stored procedure with the @parameters in the correct order. If I try the insert process I receive an error, "Exception Details: System.Data.SqlClient.SqlException: Error converting data type decimal to decimal".  Then I tried to manually set the parameter default values in the InsertCommand subroutine and get the "too many arguments specified." error.  Then in the InsertCommand subroutine I tried to clear the Insert parameters and re-added them in the same order as they are in the stored procedure but that did not help.  Lastly I decided to try hard coding the insert in the code behind page within the "GRID1_InsertCommand" subroutine using a SQLCommand, SQLConnection, etc and the Insert works.  However, it leaves the Insert window open.

Only other issue I can think of is the data table is within a sub-schema, IE: sales.MyTable instead of dbo.Mytable.  In all cases I have tried to include the schema reference in the Insert command and it did not help.  I know the stored procedure works if I try to execute it in SSMS.

Any suggestions?  Is there a way to close the Insert window if I have to resort to the manual insert using the SQLCommand?

Thanks in Advance,  Jeff
Jeff H.
Top achievements
Rank 1
 answered on 14 Jul 2013
10 answers
665 views
The first time the radwindow opens, all is well...The 2nd time the sizing is all hosed up (looks like a default size ~150x150).

Any ideas?
<telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false" runat="server" 
        Skin="Web20" Modal="true" DestroyOnClose="true" > 
        <Windows> 
            <telerik:RadWindow runat="server" ID="CoreCodeDialog" Width="600" Height="400" Behaviors="Close" 
                NavigateUrl="CoreProcedure.aspx" ShowContentDuringLoad="false" Title="Select Core Code"> 
            </telerik:RadWindow> 
            <telerik:RadWindow runat="server" ID="BundleDialog" Width="800" Height="450" Behavior="None"  
                NavigateUrl="ProcedureBundle.aspx" ShowContentDuringLoad="false" Title="Bundle Procedures"> 
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 

ridwaan
Top achievements
Rank 1
 answered on 14 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?