or
Translate this good day because I speak Spanish, with new controls telerick I have to move the contents of a ListBox to another, that the problem is simple this they need you to move from ListBoxal listbox2 sorting for this content name, any idea how to do |
Español Buen día traduzco esto pues hablo español, trabajo con los controles telerick nuevos tengo que pasar el contenido de un ListBox a otro , eso es sencillo el problema esta en que necesito que al pasar del ListBoxal listbox2 este contenido se ordene por nombre, alguna idea de como hacerlo ?? Thanks |
protected
void
listAllAcctsBtnExportToPDF_Click(
object
sender, EventArgs e)
{
ApplyStylesToPDFExport(rgListAllAccounts.MasterTableView);
rgListAllAccounts.MasterTableView.ExportToPdf();
}
//end of listAllAcctsBtnExportToPDF_Click
private
void
ApplyStylesToPDFExport(GridTableView view)
{
// Get access to the header of the grid
GridItem headerItem = view.GetItems(GridItemType.Header)[0];
// Apply some css style to the header
headerItem.Cells.Count.ToString();
foreach
(TableCell cell
in
headerItem.Cells)
{
cell.Style[
"font-family"
] =
"Verdana"
;
cell.Style[
"text-align"
] =
"left"
;
cell.Style[
"vertical-align"
] =
"middle"
;
cell.Style[
"font-size"
] =
"10px"
;
}
// Get access to the data of the grid
GridItem[] dataItems = view.GetItems(GridItemType.Item);
// Apply some css style to the data items
foreach
(GridItem item
in
dataItems)
{
foreach
(TableCell cell
in
item.Cells)
{
cell.Style[
"font-family"
] =
"Verdana"
;
cell.Style[
"text-align"
] =
"left"
;
cell.Style[
"vertical-align"
] =
"middle"
;
cell.Style[
"font-size"
] =
"10px"
;
cell.Style[
"background-color"
] =
"red"
;
}
}
}
//end of ApplyStylesToPDFExport
public
override
DirectoryItem ResolveRootDirectoryAsTree(
string
path)
{
DirectoryItem directory =
null
;
if
(path.Equals(
"ROOT/TE"
))
{
directory =
new
DirectoryItem(
"File Explorer"
,
"ROOT/TE"
,
"ROOT/TE"
,
"ROOT/TE"
, PathPermissions.Read,
null
,
null
);
List<DirectoryItem> subDirs =
new
List<DirectoryItem>();
subDirs.Add(
new
DirectoryItem(
"My Labels"
,
string
.Empty,
"ROOT/TE/TL-1"
,
"TL-1"
, PathPermissions.Read,
null
,
null
));
subDirs.Add(
new
DirectoryItem(
"Recent Documents"
,
string
.Empty,
"ROOT/TE/TL-2"
,
"TL-2"
, PathPermissions.Read,
null
,
null
));
subDirs.Add(
new
DirectoryItem(
"Recent Folders"
,
string
.Empty,
"ROOT/TE/TL-3"
,
"TL-3"
, PathPermissions.Read,
null
,
null
));
directory.Directories = subDirs.ToArray();
if
(directory.Directories !=
null
)
{
foreach
(DirectoryItem dir
in
directory.Directories)
{
dir.Permissions = GetPermissions(path);
}
}
return
directory;
}
else
{
return
directory;
}
}
public
override
DirectoryItem ResolveDirectory(
string
path)
{
DirectoryItem directory = dataServer.GetDirectoryItem(path,
true
,
true
);
if
(directory ==
null
)
return
null
;
return
directory;
}
public
DirectoryItem GetDirectoryItem(
string
path,
bool
bIncludeSubfolders,
bool
bIncludeFiles)
{
DirectoryItem diDirectory =
null
;
MyObject item =
this
.GetObjectFromPath(path);
if
(item !=
null
)
{
if
(item.sType.Equals(
"TL"
))
{
diDirectory = LoadSubNode(item, path, bIncludeSubfolders, bIncludeFiles);
}
else
if
(item.sType.Equals(
"C"
))
{
//diDirectory = CreateDirectoryItem(item, true);
}
else
if
(item.sType.Equals(
"FP"
))
{
//diDirectory = CreateDirectoryItem(item, true);
}
else
if
(item.sType.Equals(
"UL"
))
{
//diDirectory = CreateDirectoryItem(item, true);
}
}
return
diDirectory;
//return (item != null && item.sType.Equals("C")) ? this.CreateDirectoryItem(item, includeSubfolders) : null;
}
private
DirectoryItem LoadSubNode(MyObject ktoItem,
string
sPath,
bool
bIncludeSubFolders,
bool
bIncludeFiles) {
DirectoryItem diDirectory =
null
;
if
(ktoItem.sUri.Equals(
"2"
))
{
diDirectory = GetTopLevel_RecentDocuments(sPath, bIncludeFiles);
}
else
if
(ktoItem.sUri.Equals(
"3"
))
{
diDirectory = GetTopLevel_RecentContainers(sPath, bIncludeSubFolders, bIncludeFiles);
}
return
diDirectory;
}
private
DirectoryItem GetTopLevel_RecentDocuments(
string
sPath,
bool
bIncludeFiles) {
DirectoryItem diDirectory =
new
DirectoryItem(
"Recent Documents"
, sPath, sPath,
"TL-2"
, PathPermissions.Read,
null
,
null
);
if
(bIncludeFiles)
{
diDirectory.Files = LoadRecentDocuments(sPath);
}
return
diDirectory;
}
private
DirectoryItem GetTopLevel_RecentContainers(
string
sPath,
bool
bIncludeSubFolders,
bool
bIncludeFiles)
{
DirectoryItem diDirectory =
null
;
diDirectory =
new
DirectoryItem(
"Recent Containers"
, sPath, sPath,
"TL-3"
, PathPermissions.Read,
null
,
null
);
SomeSDK.Records tRecords = tDatabase.MakeRecords();
tRecords.SearchString =
"myContainers"
;
SomeSDK.Record tRecord =
null
;
List<DirectoryItem> diFolders =
new
List<DirectoryItem>();
while
((tRecord = tRecords.Next()) !=
null
)
{
string
sItemPath = GetValidPath(sPath) +
"C-"
+ tRecord.Uri.ToString();
DirectoryItem diSubItem =
new
DirectoryItem(tRecord.Title +
" ("
+ tRecord.Number +
")"
, sItemPath, sItemPath, sItemPath, PathPermissions.Read,
null
,
null
);
diSubItem.Files = (
new
List<FileItem>()).ToArray();
diSubItem.Directories = (
new
List<DirectoryItem>()).ToArray();
//diFolders.Add(new DirectoryItem(tRecord.Title + " (" + tRecord.Number + ")", sItemPath, sItemPath, sItemPath, PathPermissions.Read, null, null));
diFolders.Add(diSubItem);
//diFolders.Add(new DirectoryItem("test", string.Empty, sPath + "/1", "1", PathPermissions.Read, null, null));
}
diDirectory.Directories = diFolders.ToArray();
List<FileItem> fiDocuments =
new
List<FileItem>();
diDirectory.Files = fiDocuments.ToArray();
return
diDirectory;
}
private
FileItem[] LoadRecentDocuments(
string
sPath)
{
SomeSDK.Records tRecords = tDatabase.MakeRecords();
tRecords.SearchString =
"myDocuments"
;
SomeSDK.Record tRecord =
null
;
List<FileItem> fiDocuments =
new
List<FileItem>();
while
((tRecord = tRecords.Next()) !=
null
)
{
string
sItemPath = GetValidPath(sPath) +
"D-"
+ tRecord.Uri.ToString();
fiDocuments.Add(
new
FileItem(tRecord.Title +
" ("
+ tRecord.Number +
")"
, tRecord.Extension, tRecord.DocumentSize, sItemPath, sItemPath, tRecord.Number, PathPermissions.Read));
}
return
fiDocuments.ToArray();
}
private
string
GetValidPath(
string
sInputPath)
{
if
(!sInputPath.EndsWith(
"/"
))
{
return
sInputPath +
"/"
;
}
else
{
return
sInputPath;
}
}
<script type="text/javascript">
RadEditorCommandList[
try {
if (editor.getSelectionHtml() != "") {
var style = editor.get_contentArea().style;
style.color = oTool.value;
if (ajaxManager == null)
ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
if (ajaxManager != null)
ajaxManager.ajaxRequest(commandName);
}
else {
alert("Please, select some text!");
args.set_cancel(true);
}
}
catch (err)
{ }
}