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

Hi all,

 

I am using dependent radcomboboxes. On select of any item in combobox1, combobox2 is populated.

I am facing an issue that the vertical scroll bar appears in the dependent dropdown in a very sudden manner. Eg if number of items is 1, scroll bar appears, if it is more than one it doesnot appear. Please help me remove this scroll bar. I want scroll bar only when the dropdowns height crosses a certain limit.

 P S : I have already tried setting MaxHeight property and also

html {
overflow: hidden;
}

 

Regards,

Anurag

Aneliya Petkova
Telerik team
 answered on 11 Jun 2015
1 answer
236 views

Hi team,

I have a DataTable, which is used to bind my Radgrid. In my grid I have a Template column which creates a Link button . 

If I click the link button , I am getting my corresponding Datatable row index in itemCommand() by  "e.Item.DataSetIndex"  perfectily.

 

If I filtered my grid and click the link button, I am getting wrong Datatable row ID by  "e.Item.DataSetIndex". !

Please help , How can I get correct Datatable row id in filtered mode (itemCommand())?

 

Ramesh.

Eyup
Telerik team
 answered on 11 Jun 2015
2 answers
93 views

Hi, I'm using a Three Tier Architecture, and I am able to see the documents from my Oracle database. Anyway I'm having some trouble with the Insert option.

The grid loads fine and show the table content, I can click Add a New entry but when I click Insert nothing happens.



Here is my code so far:

The DAL makes the call to the DB, assigning properties through the Business Object class (below)

 

public List<DocsBO> InsertDocuments()
        {
            using (_connection)
            {
                _connection.Open();
                using (_command = new OracleCommand("INSERT INTO PROM_DOCS (DOCID, DOCTITLE, DOCDESCRIPTION, FILENAME, FILENAMESTARTPLAY," +
                    "TYPE, LASTEDIT, DOCVERSION, THUMBNAIL, STATUS, DISCLOSABLE, PRODUCTID, LAST_USER, LAST_EDIT, CATEGORYNAME)" +
                    "VALUES (:DOCID, :DOCTITLE, :DOCDESCRIPTION, :FILENAME, :FILENAMESTARTPLAY, :TYPE, :LASTEDIT, :DOCVERSION, :THUMBNAIL, :STATUS," +
                    ":DISCLOSABLE, :PRODUCTID, :LAST_USER, :LAST_EDIT, :CATEGORYNAME)", _connection))
                {
 
                    List<DocsBO> InsDocs = new List<DocsBO>();
 
                    using (OracleDataReader _dataReader = _command.ExecuteReader())
                    {
                        while (_dataReader.Read())
                        {
                            InsDocs.Add(new DocsBO());
                            InsDocs[InsDocs.Count - 1].Id = Convert.ToInt32(_dataReader["DOCID"]);
                            InsDocs[InsDocs.Count - 1].Name = _dataReader["DOCTITLE"].ToString();
                            InsDocs[InsDocs.Count - 1].Description = _dataReader["DOCDESCRIPTION"].ToString();
                            InsDocs[InsDocs.Count - 1].FileName = _dataReader["FILENAME"].ToString();
                            InsDocs[InsDocs.Count - 1].FileNameStartPlay = _dataReader["FILENAMESTARTPLAY"].ToString();
                            InsDocs[InsDocs.Count - 1].Type = Convert.ToInt32(_dataReader["TYPE"]);
                            InsDocs[InsDocs.Count - 1].LastEdit = Convert.ToDateTime(_dataReader["LASTEDIT"]);
                            InsDocs[InsDocs.Count - 1].Version = _dataReader["DOCVERSION"].ToString();
                            InsDocs[InsDocs.Count - 1].Thumbnail = _dataReader["THUMBNAIL"].ToString();
                            InsDocs[InsDocs.Count - 1].Status = Convert.ToInt32(_dataReader["STATUS"]);
                            InsDocs[InsDocs.Count - 1].Disclosable = Convert.ToBoolean(_dataReader["DISCLOSABLE"]);
                            #region if DBNull PRODUCTID
                            if (_dataReader["PRODUCTID"] == DBNull.Value)
                            {
                                InsDocs[InsDocs.Count - 1].ProductId = 0;
                            }
                            else
                            {
                                InsDocs[InsDocs.Count - 1].ProductId = Convert.ToInt32(_dataReader["PRODUCTID"]);
                            }
                            #endregion
                            InsDocs[InsDocs.Count - 1].LastUser = _dataReader["LAST_USER"].ToString();
                            InsDocs[InsDocs.Count - 1].LastEdit2 = Convert.ToDateTime(_dataReader["LAST_EDIT"]);
                            InsDocs[InsDocs.Count - 1].CategoryName = _dataReader["CATEGORYNAME"].ToString();
                        }
                    }
                    return InsDocs;
                }
            }
        }

 

The BLL takes the returning list from the DAL

 

public List<DocsBO> InsertDocs()
        {
            List<DocsBO> _newDocs;
 
            DocsDal NewDocs = new DocsDal();
 
            _newDocs = NewDocs.InsertDocuments();
 
            return _newDocs;
        }

 

The Presentation Layer containing the RadGrid takes the list and populates itself

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = _BLL.LoadDocs();
        }
 

 Here is my Grid

<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" GroupPanelPosition="Top"
        AllowPaging="True" AllowSorting="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateColumns="False">
        <MasterTableView CommandItemDisplay="Top" PageSize="20">
            <ItemStyle CssClass="radGridRows" />
            <AlternatingItemStyle CssClass="radGridRows" />
            <Columns>
                <telerik:GridBoundColumn DataField="Id" FilterControlAltText="Filter column column" HeaderText="Id" UniqueName="column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter column1 column" HeaderText="Name" UniqueName="column1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter column2 column" HeaderText="Description" UniqueName="column2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FileName" FilterControlAltText="Filter column3 column" HeaderText="File Name" UniqueName="column3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FileNameStartPlay" FilterControlAltText="Filter column4 column" HeaderText="FN Start Play" UniqueName="column4">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Type" FilterControlAltText="Filter column5 column" HeaderText="Type" UniqueName="column5">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="LastEdit" FilterControlAltText="Filter column6 column" HeaderText="Last Edit" UniqueName="column6" PickerType="DateTimePicker">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Version" FilterControlAltText="Filter column7 column" HeaderText="Version" UniqueName="column7">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Thumbnail" FilterControlAltText="Filter column8 column" HeaderText="Thumbnail" UniqueName="column8">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" FilterControlAltText="Filter column9 column" HeaderText="Status" UniqueName="column9">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Disclosable" DataType="System.Boolean" DefaultInsertValue="false" FilterControlAltText="Filter column10 column" HeaderText="Disclosable" UniqueName="column10">
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="ProductId" FilterControlAltText="Filter column11 column" HeaderText="Product Id" UniqueName="column11" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LastUser" FilterControlAltText="Filter column12 column" HeaderText="Last User" UniqueName="column12">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="LastEdit2" FilterControlAltText="Filter column13 column" HeaderText="Last Edit" UniqueName="column13" Visible="false" PickerType="DateTimePicker">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="CategoryName" FilterControlAltText="Filter column14 column" HeaderText="Category Name" UniqueName="column14" Visible="false">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

 

 And My Business Object Properties class

 

public class DocsBO
    {
        private int DocId;
 
        public int Id
        {
            get { return DocId; }
            set { DocId = value; }
        }
 
        private string DocName;
 
        public string Name
        {
            get { return DocName; }
            set { DocName = value; }
        }
 
        private string DocDesc;
 
        public string Description
        {
            get { return DocDesc; }
            set { DocDesc = value; }
        }
 
        private string DocFileName;
 
        public string FileName
        {
            get { return DocFileName; }
            set { DocFileName = value; }
        }
 
        private string DocFileNameStartPlay;
 
        public string FileNameStartPlay
        {
            get { return DocFileNameStartPlay; }
            set { DocFileNameStartPlay = value; }
        }
 
        private int DocType;
 
        public int Type
        {
            get { return DocType; }
            set { DocType = value; }
        }
 
        private DateTime DocLastEdit;
 
        public DateTime LastEdit
        {
            get { return DocLastEdit; }
            set { DocLastEdit = value; }
        }
 
        private string DocVersion;
 
        public string Version
        {
            get { return DocVersion; }
            set { DocVersion = value; }
        }
 
        private string DocThumbnail;
 
        public string Thumbnail
        {
            get { return DocThumbnail; }
            set { DocThumbnail = value; }
        }
 
        private int DocStatus;
 
        public int Status
        {
            get { return DocStatus; }
            set { DocStatus = value; }
        }
 
        private bool DocDisclosable;
 
        public bool Disclosable
        {
            get { return DocDisclosable; }
            set { DocDisclosable = value; }
        }
 
        private int DocProductId;
 
        public int ProductId
        {
            get { return DocProductId; }
            set { DocProductId = value; }
        }
 
        private string DocLastUser;
 
        public string LastUser
        {
            get { return DocLastUser; }
            set { DocLastUser = value; }
        }
 
        private DateTime DocLastEdit2;
 
        public DateTime LastEdit2
        {
            get { return DocLastEdit2; }
            set { DocLastEdit2 = value; }
        }
 
        private string DocCategoryName;
 
        public string CategoryName
        {
            get { return DocCategoryName; }
            set { DocCategoryName = value; }
        }
         
 
    }

 

 I also tried making a call in that way:

public List<DocsBO> InsertDocuments()
{
    List<DocsBO> InsertDocs = new List<DocsBO>();
 
    using (_connection)
    {
        _connection.Open();
        using (_command = new OracleCommand("INSERT INTO PROM_DOCS (DOCID, DOCTITLE, DOCDESCRIPTION, FILENAME, FILENAMESTARTPLAY," +
            "TYPE, LASTEDIT, DOCVERSION, THUMBNAIL, STATUS, DISCLOSABLE, PRODUCTID, LAST_USER, LAST_EDIT, CATEGORYNAME)" +
            "VALUES (:DOCID, :DOCTITLE, :DOCDESCRIPTION, :FILENAME, :FILENAMESTARTPLAY, :TYPE, :LASTEDIT, :DOCVERSION, :THUMBNAIL, :STATUS," +
            ":DISCLOSABLE, :PRODUCTID, :LAST_USER, :LAST_EDIT, :CATEGORYNAME)", _connection))
            InsertDocs.Add(new DocsBO());
        InsertDocs[InsertDocs.Count - 1].Id = Convert.ToInt32(_command.Parameters.Add(":DOCID"));
        InsertDocs[InsertDocs.Count - 1].Name = _command.Parameters.Add(":DOCTITLE").ToString();
        InsertDocs[InsertDocs.Count - 1].Description = _command.Parameters.Add(":DOCDESCRIPTION").ToString();
        InsertDocs[InsertDocs.Count - 1].FileName = _command.Parameters.Add(":FILENAME").ToString();
        InsertDocs[InsertDocs.Count - 1].FileNameStartPlay = _command.Parameters.Add(":FILENAMESTARTPLAY").ToString();
        InsertDocs[InsertDocs.Count - 1].Type = Convert.ToInt32(_command.Parameters.Add(":TYPE"));
        InsertDocs[InsertDocs.Count - 1].LastEdit = Convert.ToDateTime(_command.Parameters.Add(":LASTEDIT"));
        InsertDocs[InsertDocs.Count - 1].Version = _command.Parameters.Add(":DOCVERSION").ToString();
        InsertDocs[InsertDocs.Count - 1].Thumbnail = _command.Parameters.Add(":THUMBNAIL").ToString();
        InsertDocs[InsertDocs.Count - 1].Status = Convert.ToInt32(_command.Parameters.Add(":STATUS"));
        InsertDocs[InsertDocs.Count - 1].Disclosable = Convert.ToBoolean(_command.Parameters.Add(":DISCLOSABLE"));
        InsertDocs[InsertDocs.Count - 1].ProductId = Convert.ToInt32(_command.Parameters.Add(":PRODUCTID"));
        InsertDocs[InsertDocs.Count - 1].LastUser = _command.Parameters.Add(":LAST_USER").ToString();
        InsertDocs[InsertDocs.Count - 1].LastEdit2 = Convert.ToDateTime(_command.Parameters.Add(":LAST_EDIT"));
        InsertDocs[InsertDocs.Count - 1].CategoryName = _command.Parameters.Add(":CATEGORYNAME").ToString();
        _command.ExecuteNonQuery();
 
        return InsertDocs;
    }
}

 

 Result is the same, I did an Insert command obviously

protected void RadGrid1_InsertCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            _BLL.InsertDocs();
        }

 

But it's still the same.

Any suggestions?

 

 

CRISTINA
Top achievements
Rank 1
Iron
 answered on 11 Jun 2015
1 answer
81 views

Is possible to edit the tooltip of buttons "Move Up", "Move Down", and "Delete"? I already try this workaround Set a ToolTip to the navigation buttons but didn't work for me.

Thanks

Aneliya Petkova
Telerik team
 answered on 11 Jun 2015
1 answer
83 views
hiI use radtreeview in my page and in template for nodes i use radautocompleteboxafter change my radtreeview to LoadOnDemand my radautocompletebox  not work correctlywhen i extract a node it says Script Control  RadAutocompleteboxXXXX is not a registered script control and when i use RadAutoCompleteBox_Obj.RegisterWithScriptManager = true      my radautocompletebox not work correctly please help me tnksand sorry for my bad english
Nencho
Telerik team
 answered on 11 Jun 2015
3 answers
801 views

Hello,

 Here's my scenario:

1.  I have 3 pages.  The first page (let's call it MainPage.aspx) opens a RadWindow1.  RadWindow1 opens RadWindow2

2.  In RadWindow2, some processing is done, and after the processing, from the code behind in RadWindow2, I want to close RadWindow1.  However, I want to keep RadWindow2.

3.  On loading RadWindow1 from MainPage.aspx, I want to redirect the main page to a different aspx page.

 

 

 This is the current code:

Code in MainPage.aspx That Opens RadWindow1 (ID = OpenTok)

==================================================

 ASPX

=====

 <telerik:RadWindowManager runat="server" ID="RadWindowManager1">
        <Windows>
            <telerik:RadWindow ID="openTok"  NavigateUrl="OpenTokWindow.aspx" Header="Loading Settings ..." VisibleStatusbar ="false" VisibleOnPageLoad="false" Modal="false" OffsetElementID="main" InitialBehaviors="Maximize" runat="server" />
        </Windows>
    </telerik:RadWindowManager>

 JavaScript

========

GetRadWindowManager().open(url, "openTok");

 

Code in RadWindow1 That Opens RadWindow2 (ID = cogTest)

================================================== 

ASPX

===== 

<telerik:RadWindowManager runat="server" ID="RadWindowManager1">
        <Windows>
            <telerik:RadWindow ID="cogTest" Skin="Sunset" NavigateUrl="JSCognitiveAssessment.aspx" VisibleOnPageLoad="false"  Header="Cognitive Assessment" VisibleStatusbar="false" Modal="false" OffsetElementID="main" InitialBehaviors="Maximize" runat="server" />
        </Windows>
    </telerik:RadWindowManager>

 

JavaScript

========

 function GetRadWindow() {
         var oWindow = null; if (window.radWindow)
             oWindow = window.radWindow; else if (window.frameElement.radWindow)
                 oWindow = window.frameElement.radWindow; return oWindow;
     }

 

var oBrowserWnd = GetRadWindow().BrowserWindow;
      oBrowserWnd.hide();

        
      function closeWin() {
          oBrowserWnd.close();
      }

 

 GetRadWindowManager().open(null, "cogTest");

 

Closing the RadWindow1 from RadWindow2 code behind

============================================

string script = "function f(){closeWin(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true); 

 

Thank you for any information.

Marin Bratanov
Telerik team
 answered on 11 Jun 2015
1 answer
233 views

I'm using RadGrid for an application.

The rendered grid has filters on top of each column.  When I supply a value and select any filter from the dropdown (e.g. contains, Begins with, etc) the form posts back to the server.

I'm trying to determine the event handler for this postback.

Please advise.

 Thank you,

Tim Inouye

Eyup
Telerik team
 answered on 11 Jun 2015
6 answers
1.3K+ views

Hello,

 

I have a RadGrid that is displayed inside another RadGrid through NestedViewTemplate. This RadGrid contains auto generated columns, and one GridTemplateColumn that I have added to calculate the sum of two auto generated columns. I would like to change the location of this column, currently it shows as the first column in the RadGrid.

 

This is what the RadGrid looks like:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="false" Width="100%"
    AllowFilteringByColumn="true" AllowSorting="true" EnableHeaderContextMenu="true" EnableLinqExpressions="false"
    EnableHeaderContextFilterMenu="true" Skin="Windows7" ShowFooter="true" OnItemDataBound="RadGrid1_ItemDataBound"
    OnNeedDataSource="RadGrid1_NeedDataSource" OnPreRender="RadGrid1_PreRender" OnColumnCreated="RadGrid1_ColumnCreated" >
    <MasterTableView EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="true" AutoGenerateColumns="true" IsFilterItemExpanded="false" AllowFilteringByColumn="true" TableLayout="Auto">
    <NoRecordsTemplate>
        <div style="width:100%;text-align:center;">
            No are no records to display!
        </div>
    </NoRecordsTemplate>
    <Columns>
        <telerik:GridTemplateColumn UniqueName="Total" HeaderText="Total" SortExpression="Total">
                                                        
        </telerik:GridTemplateColumn>
    </Columns>
    <FooterStyle Font-Bold="true" Font-Size="Large" />
    </MasterTableView>
</telerik:RadGrid>

 

And the PreRender contains:

(sender as RadGrid).MasterTableView.GetColumn("Total").OrderIndex = 2;

 

But it still is being displayed as first.

Maria Ilieva
Telerik team
 answered on 11 Jun 2015
3 answers
78 views

Hi,

 I have a four page tabstrip and radmultipage with a radgrid on each page.

 I have a user control with an export button in it.

Ajax is turned off for that button.

On the initial page load, the grid does export to excel. But click on the second tab, and the export does not work.  Click on the first initial tab, and the export does not work there.  Debugging shows that the export button in my uc fires off the function with the grid.MasterTableView.ExportToExcel() call.  But the function named in the OnGridExporting RadGrid control does not fire.

 

Any insight would be greatly appreciated!

-John

Kostadin
Telerik team
 answered on 11 Jun 2015
1 answer
136 views

I'm facing 2 issues while using the RadProgressArea :

Firstly, I have a RadAsyncUpload on my page through which I am uploading files and displaying the uploaded files on the same page in a RadGrid. Each line item in the RadGrid is a downloadable file which gets downloaded on click of the link. Now, the problem which I'm facing is, whenever I click on a particular file for download, the RadProgressArea shows up and doensn't go away until I refresh the page. There is no progress indicated in the Progress Area as well.

Even if I'm hiding the Progress Area using Javascript function, it doesn't help as still the Progress Area appears.

 

Secondly, I'm facing a compatibility issue, being the functionality of the Progress Area works best in IE 10,11 and Chrome but not in IE 9, 9(Compatibility Mode).

Whenever I cancel an upload using the RadAsyncUpload - 'Cancel' Button(Runtime Button) while a file is getting uploaded, the ProgressArea still stays on the screen, though the upload is stopped. This happens only in the case of IE9 but not in IE10,11 and Chrome.

Pls. help me sort these appearance issues.

 

 

 

Ivan Danchev
Telerik team
 answered on 11 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?