Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
170 views
have a hierarchical (nested) (multi-level) tabstrip with root tabs (level 1) and child tabs (level 2).  How do I auto select a child tab be default auto-selected child tab when I select a root tab??
thanks
Kevin Mason
Top achievements
Rank 1
 answered on 20 Feb 2012
4 answers
192 views
I just wanted to post this so someone else doesn't waste the 9 hours I wasted the other day.  If you are using the RadCompression Module, in conjunction with jquery/javascript ajax calls to the web server you WILL have the following issue on your Visual Studio development web server.

The following demonstrates the issue:

Standard Telerik module includes in the system.web section of the web.config:
<httpModules>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>
<add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
</httpModules>

Standard Telerik module includes in system.webServer section of the web.config:
<modules runAllManagedModulesForAllRequests="true">
    <remove name="RadUploadModule"/>
    <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/>
    <remove name="RadCompression"/>
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
</modules>

The results of the Ajax call with the compression module included can be seen in the screen4.png attachment.

If we turn the compression module off (as follows):
<httpModules>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>
</httpModules>


<modules runAllManagedModulesForAllRequests="true">
<remove name="RadUploadModule"/>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/>
<remove name="RadCompression"/>
</modules>


The results of the Ajax call with the compression module not included can be seen in the screen5.png attachment.

Please note:  This is only an issue with the Web development server.  IIS handles the compression correctly.

I hope this helps anyone struggling with thier Ajax Calls while using telerik. 

Thanks,
Anthony
Andrew
Top achievements
Rank 1
Iron
Iron
 answered on 20 Feb 2012
4 answers
434 views
Hello,

I have a standard DateTimePicker control and I'd like to have a custom validator (server side) against it, something like this:

<telerik:RadDateTimePicker ID="picker1" runat="server" SelectedDate="<%#((DateTime)((DataRowView)Container.DataItem)[1])%>"  > 
  <DateInput DateFormat="d.M.yyyy H:mm" DisplayDateFormat="d.M.yyyy H:mm"  /> 
  <TimeView StartTime="10:0:0" EndTime="21:01:00" Interval="0:15:0" Columns="7" TimeFormat="HH:mm" Culture="cs-CZ" />  
</telerik:RadDateTimePicker> 
                     
<asp:CustomValidator ID="custValCasVykopu" runat="server" ControlToValidate="picker1" Display="dynamic" Text="Enter correct date and time" OnServerValidate="custValCasVykopu_Validate" /> 
                     

and on the server:

protected void custValCasVykopu_Validate(object source, ServerValidateEventArgs args) 
            string txtCasVykopu = args.Value; 
            DateTime casVykopu; 
            if (DateTime.TryParse(txtCasVykopu, out casVykopu)) 
            { 
                args.IsValid = true
            } 
            else 
            { 
                args.IsValid = false
            } 

Now, the problem is that in this setup, args.value is looking like this: "2010-02-27-15-00-00" and this will not parse thru DateTime.TryParse (or at least I have not found a proper combination of culture and DateTimeStyles settings that will parse this string).

My question is - is there any way to modify value property of DateTimePicker so it will produce string that will parse thru DateTime.TryParse ?

Thanks,

Antonin



Uday Anthony
Top achievements
Rank 1
 answered on 19 Feb 2012
0 answers
112 views
Hi,

I have a problem when the RadTextBox is placed within a RadAjaxPanel control as below.
By clicking submit, the RadTextBox text doesn't submitted. By removing the AutoPostBack attribute and the OnSelectedIndexChanged event of the RadComboBox controls then the RadTextBox text does submit. In addition If I don't use the RadAjaxPanel control then the RadTextBox text does submit too.

aspx:
<telerik:RadAjaxPanel ID="SSS" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="700px">
    <tr>
        <td width="120">
            <asp:Label ID="CyclLabel" runat="server" SkinID="FieldLabel" Text="Cycle:"></asp:Label>
        </td>
        <td  width="250">
            <telerik:RadComboBox ID="CycleRadComboBox" runat="server" Enabled="true" Width="215px" AutoPostBack="true" OnSelectedIndexChanged="CycleRadComboBox_SelectedIndexChanged">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="Select Cycle" Value="" />
                    <telerik:RadComboBoxItem runat="server" Text="BVT" Value="BVT" />
                    <telerik:RadComboBoxItem runat="server" Text="GQL" Value="GQL" />
                </Items>
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </telerik:RadComboBox>
        </td>
        <td  width="100">
            <asp:Label ID="StatusLabel" runat="server" SkinID="FieldLabel" Text="Status:"></asp:Label>
        </td>
        <td width="*">
            <telerik:RadComboBox ID="StatusRadComboBox" runat="server" Enabled="false" Width="215px" AutoPostBack="true" OnSelectedIndexChanged="StatusRadComboBox_SelectedIndexChanged">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="Select Status" Value="" />
                    <telerik:RadComboBoxItem runat="server" Text="Passed" Value="Passed" />
                    <telerik:RadComboBoxItem runat="server" Text="Failed" Value="Failed" />
                    <telerik:RadComboBoxItem runat="server" Text="Passed with known issues" Value="Passed with known issues" />
                </Items>
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </telerik:RadComboBox>
        </td>
    </tr>
    <tr style="height:55px;" >
        <td valign="top" width="120">
          <div style="margin-top:9px;" >
            <asp:Label ID="CmntLabel" runat="server" SkinID="FieldLabel" Text="Comment:"></asp:Label>
          </div>
        </td>
        <td colspan="3"  width="*">
            <telerik:RadTextBox ID="CommentRadTextBox" runat="server"  Width="560px" TextMode="MultiLine" Rows="2"></telerik:RadTextBox>
        </td>
    </tr>
    <tr style="height:50px;">
        <td colspan="4">
            <asp:Button ID="SubmitButton" runat="server" SkinID="ImageAndTextButton" OnClick="SubmitButton_Click" Text="Submit" />
        </td>
    </tr>
</table>
<asp:Label ID="CommentTextLabel" runat="server" Text=""></asp:Label>
</telerik:RadAjaxPanel>

c#:
protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            CommentTextLabel.Text = CommentRadTextBox.Text;
        }
 
        protected void CycleRadComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if (!Convert.ToString(e.Value).Equals(string.Empty))
                StatusRadComboBox.Enabled = true;
            else
            {
                StatusRadComboBox.Enabled = false;
                CommentRadTextBox.Enabled = false;
            }
        }
 
        protected void StatusRadComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if (!Convert.ToString(e.Value).Equals(string.Empty))
                CommentRadTextBox.Enabled = true;
            else CommentRadTextBox.Enabled = false;
        }


Can you please expalin to me how to fix this problem?

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 19 Feb 2012
1 answer
65 views
I'm using the RadToolBar in a project and the client has requested now that instead of simply having a textbox show when "Search" is clicked (like by using itemtemplate), they want > 1 textbox to appear to the right of the menu option. All of these textboxes will be autocomplete with a button available to clear the search at the farthest right point. Any suggestions on how to make this work in the toolbar?
Kate
Telerik team
 answered on 18 Feb 2012
0 answers
144 views
Can someone help with this..
I have a a RadPanelBar that im programatically populating with RadPanelItems, and 1 CheckBoxList inside of each radpanelItem.
Below is the the code i sue to pull data from a dataset and create RadpanelItem and its checkboxlist child:
-----------------------------------------
//Loading Permission Tabs
PermissionDataSet PermissionsDS = _PermissionFactory.PermissionSelectDynamicWithTables("", "", "[dbo].[Permission].[Type],[dbo].[Permission].[Name]");
string PermissionType = "";

           //Loading DS and creating RadPanelItem/CheckboxList
            for (int x = 0; x < PermissionsDS.Permission.Rows.Count; x++) {
                PermissionDataSet.PermissionRow PermissionRow = (PermissionDataSet.PermissionRow)PermissionsDS.Permission.Rows[x];
                if(!PermissionRow.Type.Equals(PermissionType)){
                    RadPanelItem ThisRadPanelItem = new RadPanelItem();
                    ThisRadPanelItem.Value = PermissionRow.Type;
                    ThisRadPanelItem.Text = PermissionRow.Type;
                    CheckBoxList ThisCheckBoxList =  new CheckBoxList();
                    ThisCheckBoxList.RepeatColumns = 8;
                    ThisCheckBoxList.RepeatDirection = RepeatDirection.Horizontal;
                    ThisCheckBoxList.CssClass = "3column";
                    //Loading Permission Items
                    PermissionDataSet ThisPermissionsDS = _PermissionFactory.PermissionSelectDynamicWithTables("", "[dbo].[Permission].[Type] = '" + PermissionRow.Type + "'", "[dbo].[Permission].[Name]");
                    if (EditMode)
                    {
                        for (int y = 0; y < ThisPermissionsDS.Permission.Rows.Count; y++)
                        {
                            int PermissionId = int.Parse(ThisPermissionsDS.Permission.Rows[y]["Id"].ToString());
                            string PermissionName = ThisPermissionsDS.Permission.Rows[y]["Name"].ToString();
                            RolePermissionDataSet.RolePermissionRow ThisRolePermissionRow = _RolePermissionFactory.RolePermissionSelectByRoleIdAndPermissionId((int)_SelectedRole.Id, PermissionId);
                            
                            ListItem ThisListItem = new ListItem();
                            ThisListItem.Text = PermissionName;
                            ThisListItem.Value = PermissionId.ToString();
                            if (ThisRolePermissionRow != null) ThisListItem.Selected = true;
                            ThisCheckBoxList.Items.Add(ThisListItem);
                        }
                    }else{
                        ThisCheckBoxList.DataSource = ThisPermissionsDS;
                        ThisCheckBoxList.DataTextField = "Name";
                        ThisCheckBoxList.DataValueField = "Id";
                    }
                    ThisCheckBoxList.ID = "ThisCheckBoxList";
                    ThisCheckBoxList.DataBind();
                    ThisRadPanelItem.Expanded = true;
                    ThisRadPanelItem.CssClass = "RadPanelBarPageContent";

                    ThisRadPanelItem.Controls.Add(ThisCheckBoxList);
                    RadPanelBarPermissions.Items.Add(ThisRadPanelItem);

                    PermissionType = PermissionRow.Type;
                }
            }

OK the important part is how i attach the radpanelitem and checkbox to the radpanel bar as you can see bolded above, and it all works well. The page loads with all radpanelitems inserted and 1 checboxlist inside of each radpanelitem.

When i try to consume the whole radpanelbar with a loop, to check which items on the checboxlist are selected, I CANT FIND THE CHECKBOX LIST,  eventhought im able to select the radpanelitem, code below:

 ffor (int x = 0; x < RadPanelBarPermissions.Items.Count; x++)
                    {
                        //RadPanelItem ThisPanelItem = RadPanelBarPermissions.FindItemByValue("");
                        RadPanelItem ThisPanelItem = (RadPanelItem)RadPanelBarPermissions.Items[x]; THIS WORKS
                        CheckBoxList ThisCheckBoxList = (CheckBoxList)RadPanelBarPermissions.Items[x].FindControl("ThisCheckBoxList"); THIS DOES NOT WORK, Checkboxlist returns null...
.....
Youll see in the picture that the controls load normal after icreate them, but when i try to acces them, the ceckboxlist is gone!!!!
Please help!!!

Thank You.
}
Cesar
Top achievements
Rank 1
 asked on 18 Feb 2012
0 answers
63 views
I am having an interesting problem when I upgraded the .NET Framework from 2.0 to 4.0.  The problem exists in all browsers that I have tried so I don't think it is browser related.

The problem is as follows:

If I enter just the domain name it brings up the default page served up by the web server.   If I click on the panel bar it will not expand.  I've even tried opening the page with one panel expanded to see if I can click on another one to close that one and have the clicked one open.  In that case, although the one I set to open is open when the page opens, I cannot get the other panel to open when I click on it.

The panels worked fine using .NET Framework 2.0 though.  But the most interesting thing is that if I specify the default page in the browser (e.g., www.mydomain.com/Default.aspx) instead of just the domain name (www.mydomain.com) then it all works like it should (i.e., when I click on a panel it opens up fine).  Thus the problem occurs on pages that I don't specify explicitly but that the server uses by default.  My web server is IIS 6.0.

Is this a bug in the PanelBar control?

Thanks
Jay
Jay
Top achievements
Rank 1
 asked on 18 Feb 2012
1 answer
138 views

RadGrid with filters is bound to a collection of objects. When filter changes, there is an async postback during which I can determine the filters by examining FilterExpression property which has the values like this:

(iif(CatalogNumber == null, \"\", CatalogNumber).ToString().ToUpper().StartsWith(\"na\".ToUpper()))

What I want to do with this is filter the collection of object on server which the grid is bound to and looks like this:

 

 

private List<LineItem> _lineItems = new List<LineItem>

 

{

 

new LineItem { Id="4300" CatalogNumber="ab" },

 

 

new LineItem { Id="4301"CatalogNumber="naf-1"}

 

 

}

 

};

I am not sure how FilterExpression can be used in this situation and why it has these "iif" and so on.  I don't want brute force method of parsing it out and thinking that there maybe a reason why it has this format. How can I plug it in to the custom collection to filter it?

-Stan

 

Stan
Top achievements
Rank 1
 answered on 17 Feb 2012
1 answer
318 views
Hi,
 I have a grid with scrolling, static headers and column resizing enabled. I want to assign minimum and maximum width for columns while reiszing them, so that user will be restricted from resizing after that(not by cancelling event). Also as grid with static headers do not recalculate width of all columns after resizing, I want to change width of other columns in oncolumnresizing or oncolumnresized event to maintain width of masterview table as a whole.
Richard
Top achievements
Rank 1
 answered on 17 Feb 2012
4 answers
308 views
Hi ,
RadTextBox is behaving like RadEditor in terms of resizable where the users can able to see the dock like panel in the lower left corner
which is similar to RadEditor.This issue is only Mozilla Firefox . User is using Firefox 10.0.
Please find the attached image file.
.InnerTextStyle
{
font-family: Verdana, Arial, Helvetica, sans-serif;

    color: black;

    font-size:9pt;
}

                           <telerik:RadTextBox ID="txtTitle" MaxLength="1000" CssClass="InnerTextStyle" runat="server"
                                                            TextMode="MultiLine" Height="62px" Width="500px" ClientIDMode="Static">
                                                        </telerik:RadTextBox>
What should be done to disable the end user to resize in Firefox?
Vasil
Telerik team
 answered on 17 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?