Jayaprakash
Top achievements
Rank 1
Jayaprakash
asked on 05 Jan 2012, 10:49 AM
Hi,
i have a requirement to display grouped items in radlistbox like below
General Action
Transfer
Document
Re-Open
Escalation
Parts
Field Involvement
Other Actions
Marketing
Owner Advantage
i have to load these items in runtime(server side) because based on some conditions i have to disable/enable listitems.Also i have to differentiate the group name and child by font and space like above.
1.Now i can able to disable items. But i am not able to insert space before the child items. please check the code below which i used to generate these items
2.For group items if i disable it , the foreground color gets changed to grey. which i want it in black color like above.
Am I missing something.Can anybody help me on this issue.
Thanks in advance
Jayaprakash Krishnan
i have a requirement to display grouped items in radlistbox like below
General Action
Transfer
Document
Re-Open
Escalation
Parts
Field Involvement
Other Actions
Marketing
Owner Advantage
i have to load these items in runtime(server side) because based on some conditions i have to disable/enable listitems.Also i have to differentiate the group name and child by font and space like above.
1.Now i can able to disable items. But i am not able to insert space before the child items. please check the code below which i used to generate these items
2.For group items if i disable it , the foreground color gets changed to grey. which i want it in black color like above.
foreach
(var group
in
CASEACTION_GROUPS)
{
RadListBoxItem groupListItem =
new
RadListBoxItem { Text = group, Enabled =
false
};
groupListItem.Font.Bold =
true
;
groupListItem.Font.Italic =
true
;
groupListItem.ForeColor = Color.Black;
listBoxCaseActions.Items.Add(groupListItem);
foreach
(var caseActon
in
caseActions)
{
var listItem =
new
RadListBoxItem { Text = caseActon.EntityName, Value = caseActon.ObjectTypeCode };
if
(!caseActon.HasPrivileges)
{
listItem.Enabled =
false
;
listItem.Text =
string
.Concat(caseActon.EntityName, CASEACTION_NO_PRIVILEGES);
}
else
if
((caseActon.ObjectTypeCode.Equals(
"10022"
) && !_caseStatus.ToLower().Equals(CASE_STATUS_PENDING_CLOSED)))
//Close Case
{
listItem.Enabled =
false
;
listItem.Text =
string
.Concat(caseActon.EntityName,
string
.Format(CASEACTION_NOT_AVAILABLE, _caseStatus));
}
else
if
(caseActon.ObjectTypeCode.Equals(
"10051"
))
//Re-open Case
{
if
(_caseStatus.ToLower().Equals(CASE_STATUS_CLOSED))
{
this
._caseActionsBusinessComponent = _caseActionsBusinessComponent ??
new
CaseActionsBusinessComponent();
var role =
this
._caseActionsBusinessComponent.GetUserSecurityRole();
if
(CASEACTION_USER_ROLE.Where(r => role.ToLower().Contains(r)).Count() > 0)
{
listItem.Enabled =
true
;
}
else
{
listItem.Enabled =
false
;
listItem.Text =
string
.Concat(caseActon.EntityName, CASEACTION_NO_PRIVILEGES);
}
}
else
{
listItem.Enabled =
false
;
listItem.Text =
string
.Concat(caseActon.EntityName,
string
.Format(CASEACTION_NOT_AVAILABLE, _caseStatus));
}
}
listBoxCaseActions.Items.Add(listItem);
}
}
Am I missing something.Can anybody help me on this issue.
Thanks in advance
Jayaprakash Krishnan
12 Answers, 1 is accepted
0
Richard
Top achievements
Rank 1
answered on 05 Jan 2012, 10:12 PM
Jayaprakash:
If you did not already see this thread, a potential solution for your requirement is available in the Adding Categories In RadListBox forum thread. And, there's a Disabled Item Color Change forum thread specific to the RadListBox that may provide some insights here.
Hope this helps.
If you did not already see this thread, a potential solution for your requirement is available in the Adding Categories In RadListBox forum thread. And, there's a Disabled Item Color Change forum thread specific to the RadListBox that may provide some insights here.
Hope this helps.
0
JAYAPRAKASH
Top achievements
Rank 1
answered on 06 Jan 2012, 12:28 PM
Jumpstart,
thanks for your reply.
i want to do this functionality in server side (C# - aspx.cs -codebehind ).
please have a look on my code which i have attached earlier.
Thanks
Jayaprakash Krishnan
thanks for your reply.
i want to do this functionality in server side (C# - aspx.cs -codebehind ).
please have a look on my code which i have attached earlier.
Thanks
Jayaprakash Krishnan
0
JAYAPRAKASH
Top achievements
Rank 1
answered on 09 Jan 2012, 06:21 AM
can anybody help me on the above issue?
0
Hi Jayaprakash,
I've prepared a sample page which I believe will help you achieve the desired functionality.
Regards,
Dimitar Terziev
the Telerik team
I've prepared a sample page which I believe will help you achieve the desired functionality.
Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
JAYAPRAKASH
Top achievements
Rank 1
answered on 10 Jan 2012, 12:22 PM
Dimitar Terziev ,
Thank you very much for ur support.
your solution solved one problem(indenting child items).but still i could not fix the disabled group item forecolor(BLACK).
the solution which u provided will make all disabled items forecolor as black.but i want this functionality only for group items, bcz i may have some disabled child items which should retain default grey color.
Thanks in advance,
Jayaprakash Krishnan
Thank you very much for ur support.
your solution solved one problem(indenting child items).but still i could not fix the disabled group item forecolor(BLACK).
the solution which u provided will make all disabled items forecolor as black.but i want this functionality only for group items, bcz i may have some disabled child items which should retain default grey color.
Thanks in advance,
Jayaprakash Krishnan
0
Hello Jayaprakash,
In order to achieve the desired functionality you should differentiate the disabled parent items from the child ones. This is why you should add a dummy class and change the color only to those items which has such css class. You could find a sample page attached.
All the best,
Dimitar Terziev
the Telerik team
In order to achieve the desired functionality you should differentiate the disabled parent items from the child ones. This is why you should add a dummy class and change the color only to those items which has such css class. You could find a sample page attached.
All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
JAYAPRAKASH
Top achievements
Rank 1
answered on 13 Jan 2012, 11:42 AM
Dimitar Terziev,
I tried the same , but its not working :(
I have posted the .aspx and attached output screenshot for your reference.
please let me know wht could be the reason.
Thanks,
Jayaprakash Krishnan
I tried the same , but its not working :(
I have posted the .aspx and attached output screenshot for your reference.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CaseActions.aspx.cs" Inherits="HP.FMC.Mss360CRM.CRM.Presentation.Web.SupportingApps.DefaultHost.Pages.CaseActions" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>
Case Actions
</
title
>
<
style
type
=
"text/css"
>
.caseAction
{
margin-left: 15px !important;
}
.groupCaseAction
{
}
</
style
>
<
link
rel
=
"stylesheet"
href
=
"../Styles/site.css"
type
=
"text/css"
/>
</
head
>
<
body
>
<
form
id
=
"formCaseAction"
runat
=
"server"
>
<
div
style
=
"margin-left: 10px"
>
<
p
>
<
asp:Label
ID
=
"lblMessage"
runat
=
"server"
meta:resourcekey
=
"lblMessageResource1"
></
asp:Label
>
</
p
>
<
asp:Panel
runat
=
"server"
ID
=
"panelCaseAction"
meta:resourcekey
=
"panelCaseActionResource1"
>
<
asp:Label
ID
=
"labelTitle"
runat
=
"server"
Font-Bold
=
"True"
meta:resourcekey
=
"labelTitleResource1"
/>
<
br
/>
<
asp:Label
ID
=
"labelSubTitle"
runat
=
"server"
meta:resourcekey
=
"labelSubTitleResource1"
/>
<
br
/>
<
p
>
<
telerik:RadScriptManager
ID
=
"ScriptManager"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadListBox
ID
=
"listBoxCaseActions"
Width
=
"500px"
runat
=
"server"
meta:resourcekey
=
"listBoxCaseActionsResource1"
>
<
ButtonSettings
TransferButtons
=
"All"
/>
<
WebServiceSettings
>
<
ODataSettings
InitialContainerName
=
""
>
</
ODataSettings
>
</
WebServiceSettings
>
</
telerik:RadListBox
>
<
script
type
=
"text/javascript"
>
Sys.Application.add_load(loadHandler);
function loadHandler() {
var listbox = $find("listBoxCaseActions");
$telerik.$(".groupCaseAction", listbox.get_element()).each(function () {
$telerik.$("span", this).css("color", "black");
});
}
</
script
>
</
p
>
<
asp:Button
ID
=
"buttonCreateNew"
runat
=
"server"
style
=
"margin-top: 10px"
meta:resourcekey
=
"buttonCreateNewResource1"
/>
<
br
/>
</
asp:Panel
>
</
div
>
</
form
>
</
body
>
</
html
>
please let me know wht could be the reason.
Thanks,
Jayaprakash Krishnan
0
Hi Jayaprakash,
I've inspected the information provide, but I'm unable to see where do you add this
Regards,
Dimitar Terziev
the Telerik team
I've inspected the information provide, but I'm unable to see where do you add this
groupCaseAction
class to your parent items. Please show me the code behind that you are using so I could inspect it as well.Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
JAYAPRAKASH
Top achievements
Rank 1
answered on 19 Jan 2012, 08:38 AM
Hi Dimitar Terziev,
Please find the below code for your reference.
Thanks,
Jayaprakash Krishnan
Please find the below code for your reference.
foreach
(var group
in
CASEACTION_GROUPS)
{
RadListBoxItem groupListItem =
new
RadListBoxItem { Text = group, Enabled =
false
};
groupListItem.Font.Bold =
true
;
groupListItem.Font.Italic =
true
;
groupListItem.ForeColor = Color.Black;
groupListItem.CssClass =
"groupCaseAction"
;
listBoxCaseActions.Items.Add(groupListItem);
foreach
(var caseAction
in
caseActions)
{
var listItem =
new
RadListBoxItem { Text = caseAction.EntityName, Value = caseAction.ObjectTypeCode };
listItem.CssClass =
"caseAction"
;
listBoxCaseActions.Items.Add(listItem);
}
}
Thanks,
Jayaprakash Krishnan
0
Hello Jayaprakash,
You implementation seems right and it's very strange that the behavior is not the desired one. In order to troubleshoot this issue could you please try to upload a runnable version of your page and send me a link to download and test it locally?
Greetings,
Dimitar Terziev
the Telerik team
You implementation seems right and it's very strange that the behavior is not the desired one. In order to troubleshoot this issue could you please try to upload a runnable version of your page and send me a link to download and test it locally?
Greetings,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Márcio
Top achievements
Rank 2
answered on 04 May 2018, 12:45 PM
Hello,
How can i change a rlbText?
Below, i attached highlighted text in images.
Best regards.
0
Hello Márcio,
Regards,
Marin Bratanov
Progress Telerik
We discussed this in your ticket yesterday and at the moment the following feature request contains all the available information: https://feedback.telerik.com/Project/108/Feedback/Details/248506-localization-for-the-summarize-by-settings-dialog-the-sum-count-avg-etc-ag. At the moment, there is no feature that will allow this text to be changed.
Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.