skip navigation
Telerik UI for ASP.NET AJAX
Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
NEW
: Design Kits for Figma
Online Training
Document Processing Library
Embedded Reporting for web and desktop
Web
Kendo UI
UI for jQuery
UI for Angular
UI for React
UI for Vue
UI for Blazor
UI for ASP.NET Core
UI for ASP.NET MVC
UI for ASP.NET AJAX
Mobile
UI for .NET MAUI
UI for Xamarin
Document Management
Telerik Document Processing
Desktop
UI for .NET MAUI
UI for WinUI
UI for WinForms
UI for WPF
Reporting
Telerik Reporting
Telerik Report Server
Testing & Mocking
Test Studio
Test Studio Dev Edition
Telerik JustMock
CMS
Sitefinity
UI/UX Tools
ThemeBuilder
Design System Kit
Templates and Building Blocks
Debugging
Fiddler
Fiddler Everywhere
Fiddler Classic
FiddlerCap
FiddlerCore
Free Tools
VB.NET to C# Converter
Testing Framework
View all products
Overview
Demos
Roadmap
What's New
Roadmap
Release History
Migrate to Blazor
Docs & Support
Support and Learning
Support and Learning Hub
Docs
Demos
Virtual Classroom
Forums
Videos
Blogs
Accessibility and Security
Submit a Ticket
Productivity and Design Tools
Visual Studio Extensions
ThemeBuilder
Embedded Reporting
Pricing
Shopping cart
Login
Contact Us
Try now
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX
This is a migrated thread and some comments may be shown as answers.
Need to display data from code behind to main page Grid control
1 Answer
68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
naimish
Top achievements
Rank 1
naimish
asked on
06 Aug 2010,
03:38 PM
Hi,
In my code behind, iam fetching some data from webservice and manupulating it as per need and storing
into hashtable.
Now i wanted to display that hashtable data inside RADListView in the form of rows, The RadListView is under NestedViewTemplate of RadGrid.
I tried it to display, but data is not showing when i try to view in browser.
I
n the Control page (ascx):
<NestedViewTemplate>
<asp:Panel ID="panel2" runat="server" >
<telerik:RadListView ID="RadListView2" runat="server">
<td >
Address:<%# Eval("ADDRESS")%>
</td>
<td>
<!-- Need to display----->
<asp:Label ID="Label11" runat="server" Text='
<%#keysLst3[0].ToString()
%>'>
</asp:Label>
</td>
</telerik:RadListView>
</asp:Panel>
</NestedViewTemplate>
in Code behind (cs.ascx):
protected void PopulateServices()
{
public ArrayList keysLst3 = null;
public ArrayList list = null;
public ArrayList actuaList = null;
public Hashtable table = null;
public static ArrayList GetKeys(Hashtable table)
{
return (new ArrayList(table.Keys));
}
string ID1="someID1";
string ID2="someID1
";
list = new ArrayList();
actuaList = new ArrayList();
table = new Hashtable();
actuaList.Add("A");
actuaList.Add("CB");
actuaList.Add("Adv");
ServicesWS.RecordSoap service= new ServicesWS.RecordSoap();
service.Credentials = CPUtil.GetUserCredentials();
// Call web service, convert it to list and setting up datasource
int x = service.GetServices(ID1, ID2).Count<ServicesWS.Service>();
for (int i = 0; i < x;i++ )
{
list.Add(service.GetServices(ID1, ID2).ElementAt<ServicesWS.Services>(i).NAME);
}
if (list.Count > 0)
{
for (int j = 0; j < list.Count; j++)
{
table.Add(list[j], 1);
}
}
for (int i = 0; i < actuaList.Count; i++)
{
if (!table.ContainsKey(actuaList[i]))
{
table.Add(actuaList[i], 0);
}
}
keysLst3 = GetKeys(table);
// Need these data to display along with other data which are coming from DB.
keysLst3[0].ToString();
table[keysLst3[0]].ToString();
}
Add a comment
Submit comment
Cancel
1 Answer
, 1 is accepted
Sort by
Score
Date
0
Accepted
Veli
Telerik team
answered on
11 Aug 2010,
03:34 PM
Hello naimish,
You need to have at least RadListView's
ItemTemplate
defined. For tabular data, refer to the
RadListView predefined layouts demo
to get acquainted with the various predefined listview layouts you can use, or to the
RadListView custom layouts demo
on how to customize your listview layout.
Greetings,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
Add a comment
Submit comment
Cancel
Answer this question
Drag and drop files here or
browse
to attach...
Browse
for files to attach...
Supported file types: PNG, JPG, JPEG, ZIP, RAR, TXT. Max total file size - 20MB.
Submit answer
Cancel
Tags
Grid
Asked by
naimish
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or
Copy link