Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
114 views
Hi,

I'm trying to slow down the rotator, however Ive found this in the demo:

FrameDuration - specifies the time in milliseconds each frame will display in automatic scrolling scenarios. This property is ignored in the Buttons and SlideShowButtons modes.

In this case, how do I change the speed, or can't I?
Georgi Tunev
Telerik team
 answered on 03 Oct 2008
5 answers
212 views
I have a Dynamic tooltip in my RadGrid.  When I sort a column, how can I have the tooltip update?
Iana Tsolova
Telerik team
 answered on 03 Oct 2008
2 answers
120 views
Hi,
 
   I'm having trouble adapting the example of Load on Demand, this error occurring in WebConfig, what information I have to add to use the ToolTip?
Svetlina Anati
Telerik team
 answered on 03 Oct 2008
3 answers
318 views
Hello,
we are trying to set up programmatically a tooltip manager on a RadGrid defined programmatically in a class inheriting Control. We associate both the RadGrid and the RadTooltipManager with the RadAjaxManager, and the generic item of the RadGrid is associated with a RadContextMenu with RightClick. The ContextMenu works, but we can't access programmatically to the OnAjaxUpdate event of the ToolTipManager (and we can't define the tooltipmanager on a ascx control, due to architectural design) because the compiler response is that the OnAjaxUpdate in not accessibile:

Error 7 'Telerik.Web.UI.RadToolTipManager.OnAjaxUpdate(Telerik.Web.UI.ToolTipUpdateEventArgs)' is inaccessible due to its protection level)

Could anyone help us?

Thanks a lot for the attention.
Svetlina Anati
Telerik team
 answered on 03 Oct 2008
1 answer
152 views
Hi, All:

I have 18 columns in my RadGrid.  One of the column is an <asp:CheckBox and another column is with an <asp:TextBox.

I would like to have validation:  whenever the checkbox is checked, that textbox must have something inputed.

Please help.

If you suggest me to use GridChectBoxColumn instead of <asp:CheckBox, I can surely follow.

thanks.

Stanely 
Shinu
Top achievements
Rank 2
 answered on 03 Oct 2008
7 answers
215 views
Hi,
My tooltip displays my control, which contains radtextbox, checkbox and a radcombobox.
All are fine except the radcombobox is hidden behind the tooltip control when fired ?

Any ideas please ?

Thanks
Mark
Svetlina Anati
Telerik team
 answered on 03 Oct 2008
2 answers
139 views
Hello,

I can not find any solutions for the next problem.

In my datagrid i have a column with values like 001, 002, 003, etc..
The values must stay like they are, string values. (all the other data in the column is also string.)
When i export to excel the values become 1, 2, 3, etc..

My question is, how can i managed to let the values stay strings, when i export to excel.


Marco
Top achievements
Rank 1
 answered on 03 Oct 2008
1 answer
129 views
My web part works as expected, but if I add a radTextbox after the tree instead of a standard web textbox control, AJAX no longer works, instead generating an "... Invalid Viewstate error"

Here's my code that adds contrlos, called from :

' objects available to be updated via ajax

Private _timeLabel As Label

Private _txtUserid As New TextBox   ' If I change this to RadTextBox, viewstate errors occur.

Private _statusLabel As Label

Private m_RadTreeFolderHierarchy As New Telerik.Web.UI.RadTreeView

 

Public Sub New()

Me.ExportMode = WebPartExportMode.All

GetUserInfoFromWSS()

 

End Sub

 

Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)

MyBase.OnInit(e)

Page.ClientScript.RegisterStartupScript(

GetType(_TreeNav_Webpart), Me.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", True)

If Me.Page.Form IsNot Nothing Then

Dim formOnSubmitAtt As String = Me.Page.Form.Attributes("onsubmit")

If Not String.IsNullOrEmpty(formOnSubmitAtt) AndAlso formOnSubmitAtt = "return _spFormOnSubmitWrapper();" Then

Me.Page.Form.Attributes("onsubmit") = "_spFormOnSubmitWrapper();"

End If

' Check for a scriptmanager, if none, add one.

Dim scriptManager As ScriptManager = Web.UI.ScriptManager.GetCurrent(Me.Page)

If scriptManager Is Nothing Then

scriptManager =

New RadScriptManager()

Me.Page.Form.Controls.AddAt(0, scriptManager)

End If

 

End If

End Sub

Protected Overloads Overrides Sub OnLoad(ByVal e As EventArgs)

MyBase.OnLoad(e)

AddControls()

End Sub


Protected

Sub AddControls()

Dim

nl As String = Environment.NewLine

Dim msgTxt As String = ""

Dim wrapPanel As New Panel()

wrapPanel.ID =

"Panel1"

Me.Controls.Add(wrapPanel)

Dim lblUserId As New Web.UI.WebControls.Label

lblUserId.Text =

"UID: " + _AttorneyID

lblUserId.ToolTip = _WorkEmail

wrapPanel.Controls.Add(lblUserId)

 

 

m_RadTreeFolderHierarchy.ID = "

NavTree" ' this name is referenced in client side javascript

'_txtUserid.Text = Environment.UserName

Try

' see if TreeData" & _AttorneyID & ".xml" exists to use. If not, use the default tree.

'If IO.File.Exists("~/MJComponentSupport/TreeData_" & _AttorneyID & ".xml") Then

Try

m_RadTreeFolderHierarchy.LoadContentFile(

"~/TreeSupport/Userdata/TreeData_" & Environment.UserName & ".xml")

msgTxt = Environment.UserName &

"'s Tree Loaded"

Catch ex As Exception

 

msgTxt =

"Default Tree Loaded"

m_RadTreeFolderHierarchy.LoadContentFile(

"~/TreeSupport/Userdata/TreeData.xml")

End Try

' change some visual display options

m_RadTreeFolderHierarchy.EnableTheming =

True 'similar to tree item

m_RadTreeFolderHierarchy.EnableAjaxSkinRendering =

True

m_RadTreeFolderHierarchy.Skin = _RadSkin

m_RadTreeFolderHierarchy.AllowNodeEditing =

False

m_RadTreeFolderHierarchy.CheckBoxes =

True

m_RadTreeFolderHierarchy.EnableDragAndDrop =

True

AddHandler m_RadTreeFolderHierarchy.NodeDrop, AddressOf treeView_NodeDrop

AddHandler m_RadTreeFolderHierarchy.NodeClick, AddressOf treeView_NodeClick

AddHandler m_RadTreeFolderHierarchy.ContextMenuItemClick, AddressOf treeViewMenu_ItemClick 'ContextMenuItemClick

AddHandler m_RadTreeFolderHierarchy.NodeEdit, AddressOf treeView_NodeTextChanged

'AddHandler m_RadTreeFolderHierarchy.NodeContextClick, AddressOf tvnodecontextclic

Catch ex As Exception

Dim RadTreeNodeRoot As New Telerik.Web.UI.RadTreeNode(_WorkEmail)

m_RadTreeFolderHierarchy.Nodes.Add(RadTreeNodeRoot)

RadTreeNodeRoot =

New Telerik.Web.UI.RadTreeNode(ex.Message)

m_RadTreeFolderHierarchy.Nodes.Add(RadTreeNodeRoot)

End Try

Try

' ADD Defaul Menu for tree

m_RadTreeFolderHierarchy.ContextMenus.Add(

New RadTreeViewContextMenu())

m_RadTreeFolderHierarchy.ContextMenus(0).LoadContentFile(

"~/TreeSupport/TreeMenu.xml")

' Menu for My Matters (Clients) top level.

m_RadTreeFolderHierarchy.ContextMenus.Add(

New RadTreeViewContextMenu())

m_RadTreeFolderHierarchy.ContextMenus(1).LoadContentFile(

"~/TreeSupport/ClientsMenu.xml")

' Menu for client record

m_RadTreeFolderHierarchy.ContextMenus.Add(

New RadTreeViewContextMenu())

m_RadTreeFolderHierarchy.ContextMenus(2).LoadContentFile(

"~/TreeSupport/ClientMenu.xml")

Catch ex As Exception

End Try

'add tree to panel

wrapPanel.Controls.Add(m_RadTreeFolderHierarchy)

'add a label control

_timeLabel =

New Label()

_timeLabel.Text = DateTime.Now.ToLongTimeString()

wrapPanel.Controls.Add(_timeLabel)

' add label to panel

Dim linebreak As Label = New Label()

linebreak.Text =

" "

wrapPanel.Controls.Add(linebreak)

' add label to panel

'add a label control

_statusLabel =

New Label()

_statusLabel.Text = msgTxt

wrapPanel.Controls.Add(_statusLabel)

' add label to panel

wrapPanel.Controls.Add(linebreak)

' add label to panel

' add user textbox

wrapPanel.Controls.Add(_txtUserid) ' add label to panel

Dim ajaxManager As RadAjaxManager = RadAjaxManager.GetCurrent(Me.Page)

If ajaxManager Is Nothing Then

ajaxManager =

New RadAjaxManager()

ajaxManager.ID =

"RadAjaxManager1"

Controls.Add(ajaxManager)

Me.Page.Items.Add(GetType(RadAjaxManager), ajaxManager)

End If

'20080911 bac using ajaxManager instead of

ajaxManager.AjaxSettings.AddAjaxSetting(m_RadTreeFolderHierarchy, wrapPanel)

' Me.Controls.Add(m_RadTreeFolderHierarchy)

End Sub

Rosen
Telerik team
 answered on 03 Oct 2008
1 answer
170 views
I have a scenario in which a user may select from a number of predefined queries which loads a RadGrid. The grid is generated dynamically as the columns may vary from query to query. This is all working until I tried adding DetailTables for the MasterTableView. I tried to recreate my issue by following examples in documentation and it all worked, until I added a button that would simulate the selection of a query. If the grid is added to the control collection initially without any DetailTables it seems like it is impossible to add one later. Is this by design?

Here is the code for my sample application.

protected void Page_Init(object sender, System.EventArgs e)  
{  
    PopulateGridOnPageInit();  
}  
 
private bool LoadGrid()  
{  
    //Hidden field is set true when "Load Grid" button is clicked  
    string loadGrid = Request.Form.Get(this.uxHiddenField_LoadGrid.UniqueID);  
    if (!string.IsNullOrEmpty(loadGrid))  
    {  
        return Boolean.Parse(loadGrid);  
    }  
    else 
    {  
        return false;  
    }  
}  
 
private void PopulateGridOnPageInit()  
{  
    RadGrid radGrid = new RadGrid();  
    radGrid.ID = RadGridId;  
 
    if (!LoadGrid())  
    {  
        radGrid.Visible = false;  
        // Add the Grid to the page  
        uxPlaceHolder.Controls.Add(radGrid);  
        return;  
    }  
    // Set properties  
    radGrid.Skin = "Vista";  
    radGrid.PageSize = 25;  
    radGrid.AllowPaging = true;  
    radGrid.AllowCustomPaging = true;  
    radGrid.AllowSorting = true;  
    radGrid.MasterTableView.AllowCustomSorting = true;  
    radGrid.MasterTableView.EnableColumnsViewState = false;  
    radGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;  
 
    radGrid.ClientSettings.Selecting.AllowRowSelect = true;  
    radGrid.ClientSettings.Selecting.EnableDragToSelectRows = false;  
    radGrid.ClientSettings.Resizing.AllowColumnResize = false;  
    radGrid.ClientSettings.Resizing.ClipCellContentOnResize = false;  
    radGrid.ClientSettings.Resizing.EnableRealTimeResize = false;  
    radGrid.ClientSettings.ReorderColumnsOnClient = false;  
    radGrid.ClientSettings.AllowColumnsReorder = false;  
    radGrid.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder;  
 
    radGrid.ShowGroupPanel = false;  
    radGrid.GroupingEnabled = false;  
    radGrid.GroupPanel.Visible = false;  
    radGrid.ShowFooter = false;  
    radGrid.MasterTableView.ShowFooter = false;  
 
    // Selecting multiple rows (client-side)  
    radGrid.AllowMultiRowSelection = true;  
    GridClientSelectColumn gridClientSelectColumn = new GridClientSelectColumn();  
    gridClientSelectColumn.ItemStyle.Width = Unit.Percentage(1);  
    radGrid.Columns.Add(gridClientSelectColumn);  
 
    // Build the columns dynamically  
    radGrid.AutoGenerateColumns = false;  
 
    GridBoundColumn column = new GridBoundColumn();  
    column.DataField = "ID";  
    column.HeaderText = "Customer Identifier";  
    radGrid.Columns.Add(column);  
    column = new GridBoundColumn();  
    column.DataField = "Name";  
    column.HeaderText = "Name";  
    radGrid.Columns.Add(column);  
    column = new GridBoundColumn();  
    column.DataField = "Company";  
    column.HeaderText = "Company";  
    radGrid.Columns.Add(column);  
    GridTableView childTable = new GridTableView(radGrid);  
    childTable.Width = Unit.Percentage(100);  
    childTable.DataMember = "CustomerID";  
    column = new GridBoundColumn();  
    column.DataField = "ID";  
    column.HeaderText = "Order Identifier";  
    childTable.Columns.Add(column);  
    column = new GridBoundColumn();  
    column.DataField = "OrderDate";  
    column.HeaderText = "Order Date";  
    childTable.Columns.Add(column);  
    column = new GridBoundColumn();  
    column.DataField = "Cost";  
    column.HeaderText = "Cost";  
    childTable.Columns.Add(column);  
    radGrid.MasterTableView.DetailTables.Add(childTable);              
 
    // Wire up the method that will get the grid data  
    radGrid.NeedDataSource += new GridNeedDataSourceEventHandler(radGrid_NeedDataSource);  
 
    radGrid.DetailTableDataBind += new GridDetailTableDataBindEventHandler(radGrid_DetailTableDataBind);  
 
    // Set the key for client side selection  
    radGrid.MasterTableView.ClientDataKeyNames = new string[] { "ID" };  
 
    // Set the key for server side selection  
    radGrid.MasterTableView.DataKeyNames = new string[] { "ID" };  
 
    // Add the Grid to the page  
    uxPlaceHolder.Controls.Add(radGrid);  
}  
 
protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
{  
    if (!e.IsFromDetailTable)  
    {  
        // Get the rad grid  
        RadGrid radGrid = (RadGrid)source;  
 
        // Bind it to the Grid  
        radGrid.DataSource = this.Customers;  
 
        // Set the count  
        radGrid.VirtualItemCount = this.Customers.Count;  
    }  
}  
 
protected void radGrid_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)  
{  
    GridDataItem dataItem = e.DetailTableView.ParentItem;  
    switch (e.DetailTableView.DataMember)  
    {  
        case "CustomerID":  
            List<Order> orders = GetOrdersForCustomer((int)dataItem.GetDataKeyValue("ID"));  
            e.DetailTableView.DataSource = orders;  
            e.DetailTableView.VirtualItemCount = orders.Count;  
            break;  
        default:  
            break;  
    }  


Any thoughts or advice would be very appreciated.

Thanks,

Adam
Iana Tsolova
Telerik team
 answered on 03 Oct 2008
5 answers
77 views
Hi all,
I'm evaluating the suite and I have a problem with the window component.

When I create 2 or more windows, when a move a window, the contents of ALL the other windows desappear and when I stop to move the window, all the contents re-appear.

It's normal?
I don't want this behaviour...

Many thanks.
Giorgio.

Georgi Tunev
Telerik team
 answered on 03 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?