View Single Post
  #47 (permalink)  
Old 08-23-2007, 09:59 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: ASP.NET Data Controls

hi

the primary key can allso get thru another way by assigning the content inside the datable and access the datable content through the system. the dataTable sample is shown bellow u can try through this way also

DataTable membersDataTable = new DataTable();
DataRow membersDataRow;
DataView membersDataView = new DataView();

membersDataTable.Columns.Add(new DataColumn("Name"));
membersDataTable.Columns.Add(new DataColumn("Description"));

userGroup = userGroupManager.GetUserGroupByGroupCategoryId(gro upCategoryId);
if (userGroup.Length > 0)
{
for (int i = 0; i < userGroup.Length; i++)
{
membersDataRow = membersDataTable.NewRow();

userGroupId = userGroup[i].ID;

if (userGroup[i].PrivacyTypeId == 1)
{
membersDataRow[0] = "Public Group";
}
else
{
membersDataRow[0] = "Private Group";
}
userGroupMemberCount = userGroupMemberManager.GetUserGroupMemberCount(use rGroupId);

membersDataRow[2] = userGroup[i].Name;
membersDataRow[3] = userGroup[i].Description;

membersDataTable.Rows.Add(membersDataRow);
}
membersDataView = membersDataTable.DefaultView;
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Reply With Quote