Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
162 views
Thanks Telerik team for replying on my previous thread. Somehow I lost it so opening a new one. Thanks for sending me the exact solution to my problem. I have started working towards the example you send me. http://www.telerik.com/help/aspnet-ajax/grdcustomoptionforfiltering.html 

It's throwing an error "Object reference not set to an instance of an object." on "string[] values = tbPattern.Text.Split(' ');". Don't know why ??

if (e.CommandName == RadGrid.FilterCommandName)
            {
                Pair filterPair = (Pair)e.CommandArgument;
                if (filterPair.Second.ToString() == "DateCreated")
                {
                    string colName = filterPair.Second.ToString();
                    TextBox tbPattern = (e.Item as GridFilteringItem)[colName].Controls[0] as TextBox;
                    string[] values = tbPattern.Text.Split(' ');
                    if (values.Length == 2)
                    {
                        e.Canceled = true;
                        string newFilter = "(([" + filterPair.Second + "] >='" + values[0] + "') AND ([" + filterPair.Second + "] <='" + values[1] + "'))";
                        if (taskGrid.MasterTableView.FilterExpression == "")
                        {
                            taskGrid.MasterTableView.FilterExpression = "('" + startDate1.Value.ToString("MM/dd/yyyy HH:mm:ss") + "' <= [DateCreated] AND [DateCreated] <= '" + endDate1.Value.ToString("MM/dd/yyyy HH:mm:ss") + "')" + newFilter;
                        }
                        else
                        {
                            taskGrid.MasterTableView.FilterExpression += " AND ('" + startDate1.Value.ToString("MM/dd/yyyy HH:mm:ss") + "' <= [DateCreated] AND [DateCreated] <= '" + endDate1.Value.ToString("MM/dd/yyyy HH:mm:ss") + "'  )";
                        }
  
                    }
                }
  
            }
Please help
Marin
Telerik team
 answered on 03 Jan 2011
3 answers
92 views
I am looking for an example on using 'set_eventArgument()' in OnRequestStart event. I see no documentation on how to use it,
When I tried to use it in following manner, I get an error. So some documentation would help.
function OnRequestStart(sender, args) {
                //get a reference to the current RadWindow
                var oWnd = GetRadWindow();
                args.set_eventArgument(oWnd["EmailAddress"]);
            }

Thanks
Sunil
Iana Tsolova
Telerik team
 answered on 03 Jan 2011
3 answers
154 views
I want to cancel edit-, insert-form in my needdatasource when I bind a new table when the previous table had an a form opened up! (otherwhise this will cause problems!

//h
Pavlina
Telerik team
 answered on 03 Jan 2011
3 answers
235 views
Hi,

I am using RadToolTipManager for showing ToolTip for my RadTreeView Nodes. I want to show tooltip for my specific RadTreeView Node not for every Node. Is there anyway that I can achieve with some ajaxrequest so that I can hide my tooltip or show for that node which I would like to show. 

I am having one more problem that on AjaxUpdate I am sorting my Radlistbox items but they do not sort. Any help would be really appreciated.

Protected Sub RadToolTipmanager_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs)


        Dim roleName As String = e.Value
        Dim listOfUsersInToolTip As New RadListBox
        listOfUsersInToolTip.Width = 150
        listOfUsersInToolTip.Height = 200
        Dim usersList As ArrayList = rc.GetUserRolesByRoleName(DNN.GetPMB(Me).PortalId, roleName)
        If usersList.Count <> 0 Then
            For Each user As DotNetNuke.Entities.Users.UserRoleInfo In usersList
                listOfUsersInToolTip.Items.Add(New RadListBoxItem(user.FullName, user.UserID))
            Next
            listOfUsersInToolTip.SortItems()
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(listOfUsersInToolTip)
        Else


        End If




    End Sub
Svetlina Anati
Telerik team
 answered on 03 Jan 2011
1 answer
102 views
I am working on an application which is accessing server frequently. I have multiple rad windows on the page. Whenever a post back occurs, all closed windows reopen with the last one in markup sequence on top. Any idea how to resolve this issue. 

Princy
Top achievements
Rank 2
 answered on 03 Jan 2011
4 answers
772 views
Dear All,

I´m pretty new to Telrik controls and have the following question.

I´m using a RadPanelBar to be able to let the user push the RadPanelBar and display 1-n activities presented as checkBoxes (I need to add these dynamically as I do not know how many acitivities there might be). The checkboxes should be presented as subItems and with that I mean that I want the user to push the RadPanelBar and the different activities/checkboxes should slide open/out. My idea is to grab the CheckBox2 in the RadPanelBar and add the actitivities to it. 

For achiving this I use the follwing code in my .ascx file:

 <telerik:RadPanelBar ID="RadPanelBar1" runat="server"> 
        <Items> 
            <telerik:RadPanelItem runat="server" Text="Activities"> 
                <Items> 
                    <telerik:RadPanelItem runat="server" Value="templateHolder"> 
                        <ItemTemplate> 
                            <asp:CheckBox ID="CheckBox2" runat="server" /> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
        </Items>  
 </telerik:RadPanelBar>

This is my  .ascx.cs file:

public override void DoLayout( )
  {
     //Get collection
     TrackableCollection<ProjectActivityBooking> acitivities = existingRegistration.ProjectParticipant.ProjectEntity.ProjectActivityBooking;
     //Here it is possible to get hold of the checkbox
     CheckBox cb = RadPanelBar1.FindItemByValue("templateHolder").FindControl("CheckBox2") as CheckBox;
     //Add datasource and bind
     this.RadPanelBar1.ItemDataBound += new RadPanelBarEventHandler(itemDatabound);
     this.RadPanelBar1.DataSource = acitivities;
     this.RadPanelBar1.DataBind();
  }

The code below let me add a new instatited CheckBox, but it is not added as subitem. Instead I´m getting a "static" RadPanelBar without the nice feature of being pushed and sliding out the subitems ie. activities

void itemDatabound(Object sender, RadPanelBarEventArgs e)
  {
     //Get panelItem
     RadPanelItem item = (RadPanelItem)e.Item;
     //Create Checkbox
     CheckBox chk = new CheckBox();
     //Get Activity
     ProjectActivityBooking activity =  item.DataItem as ProjectActivityBooking;
     //Set activity name
     chk.Text = activity.ProjectActivity.ActivityName;
     //Add control
     item.Controls.Add(chk);
   }

I think the way forward is something like below, but that will not get me my CheckBox.
void itemDatabound(Object sender, RadPanelBarEventArgs e)
{
   //This will throw an exception
   //CheckBox cb1 = RadPanelBar1.FindItemByValue("templateHolder").FindControl("CheckBox2") as CheckBox;
   //This will return null as it will now find the templateHolder RadPanel item
   //How will I then get hold of the CheckBox2 when the templateholder do not find/returns null
   //RadPanelItem item = e.Item.FindControl("templateHolder") as RadPanelItem;
}

Please let me know what I´ve done wrong?

Best Regards,

Thomas Andersson

Simon
Telerik team
 answered on 03 Jan 2011
2 answers
152 views
Hi,
I have try many time to use the Asp Required field validater with RedAsynUpload Cotrol but it always throw error.
So its any resource or method are available, so that i can apply facility as Required field validater with Red asyn upload control .
Thanks
Deepak
Top achievements
Rank 2
 answered on 03 Jan 2011
1 answer
119 views
Hi
I using Vs.2008
I have a RadTripStrip with 4 tabs
I want fire OnTabClick event on server side just for one of those tabs

I write OnClientTabSelecting event, i can determine in this event what tab is selecting
Now, how i prevention OnTabClick event in my cutom case?
Shinu
Top achievements
Rank 2
 answered on 03 Jan 2011
4 answers
72 views

Hi, 
I am using a MOSSradEditor inside the following control hirarchy: 

Sharepoint Web part
- - - - Web user control
- - - - - - - - Rad Dock
- - - - - - - - - - - - MOSSRadEditor.

I would like to have ModeChange event of the MOSSRadEditor on the server side. For this purpose I handle the ClientModeChange event and then use RadAjaxManager to send the ajaxrequest to the server. But the method $find returns null in the line: 

 

var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");

 

 

Therefore I receive the javascript error Error: 'null' is null or not an object on the next line:        

 

ajaxManager.ajaxRequest(operation);

 

 

Can you pleae let me know how I can solve this problem, 
or proposing any pther way to have ModeChange event on the server side?
Here is the code section.

 

<%

 

@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditFormUI.ascx.cs"

 

 

 

 

 

 

 

Inherits="EditingTools.Core.EditFormUI" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI, Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

 

 

 

 

 

 

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<%

 

@ Register Assembly="RadEditorSharePoint, Version=5.8.1.0, Culture=neutral, PublicKeyToken=1f131a624888eeed"

 

 

 

 

 

 

 

Namespace="Telerik.SharePoint" TagPrefix="telerikSP" %>

 

 

 

 

<

 

 

asp:ScriptManager ID="ScriptManager1" runat="server">

 

</

 

 

asp:ScriptManager>

 

<

 

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

</

 

 

telerik:RadAjaxManager>

 

<

 

 

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

 

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

 

function ajaxRequest(operation) {

 

 

 

var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");

 

ajaxManager.ajaxRequest(operation);

}

 

 

</script>

 

</

 

 

telerik:RadScriptBlock>

 

<

 

 

telerik:RadDockLayout ID="RadDockLayout1" runat="server">

 

 

 

 

 

 

 

<telerik:RadDockZone ID="dockZone" runat="server" Orientation="Vertical" Width="100%"

 

 

 

 

 

 

 

FitDocks="true">

 

 

 

 

 

 

 

<telerik:RadDock ID="dockAma" runat="server" >

 

 

 

 

 

 

 

<ContentTemplate>

 

 

 

 

 

 

 

<telerikSP:MOSSRadEditor ID="EditorAma" runat="server" OnClientModeChange="Editor_ModeChange">

 

 

 

 

 

 

 

<Content>

 

 

 

 

 

 

 

</Content>

 

 

 

 

 

 

 

</telerikSP:MOSSRadEditor>

 

 

 

 

 

 

 

</ContentTemplate>

 

 

 

 

 

 

 

</telerik:RadDock>

 

 

 

 

 

 

 

</telerik:RadDockZone>

 

</

 

 

telerik:RadDockLayout>

 

 

 

 

 

<

 

 

script type="text/javascript">

 

 

 

 

 

RadEditorCommandList[

 

"Save"] = function (commandName, editor, oTool) {

 

ajaxRequest(

 

"Save" );

 

}

RadEditorCommandList[

 

"Cancel"] = function (commandName, editor, oTool) {

 

ajaxRequest(

 

"Cancel");

 

}

 

 

function Editor_ModeChange(editor, args) {

 

 

 

var mode = editor.get_mode();

 

 

 

switch (mode) {

 

 

 

case 1:

 

ajaxRequest(

 

"Design" );

 

 

 

break;

 

 

 

case 4:

 

ajaxRequest(

 

"Preview" );

 

}

}

 

 

 

</

 

 

script>

 

Thank you in advance.

 

 

 

Ali
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
179 views
Hello and marry xmas and so on ;)

my multiple columns show up like that:

. DataItem.field1
. DataItem.field2
. DataItem.field3

instead of

. DataItem.field1 | . DataItem.field2 | . DataItem.field3

i went through the demo page example code and css multiple times but i dnot know why my ul, li, li, li ... does'nt want to show up horizontal as in the demo.

Hope u can help me.

Maybe tell me which part of the code/css/asp makes this behavoir happen.

thx Mario
Mario
Top achievements
Rank 2
 answered on 03 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?