Hello,
I have a RAD Grid that has several people's records and the first column is an ID (named SID)field. What I want to do, is on a button click, build a comma delimited string of all the ID's in the Grid. I have done this in VB but now need to convert it to C# and m having a bit of trouble with it. It would be a bit simpler but I actually use the SID column as a link to each person's profile, so it's not as simple as somethinging like:
OwnerTableView.Columns.FindByUniqueName("SID").ToString(); (If I do this I get "<a href=/default.aspx?sid=XXXX>XXXX </a>" as the value, when I only want the XXXX part.
This is what I use in VB to make the string, I use the Data key values (which is the SID field).
Session("sidlist") = Nothing
Dim SID_ListNewStudents As StringBuilder = New StringBuilder()
For Each item As Telerik.Web.UI.GridDataItem In SelectedGrid.MasterTableView.Items
SID_ListNewStudents.Append(item.OwnerTableView.DataKeyValues(item.DataSetIndex).Values(0))
SID_ListNewStudents.Append(", ")
Next
Any help would be great, Thanks!
I have a RAD Grid that has several people's records and the first column is an ID (named SID)field. What I want to do, is on a button click, build a comma delimited string of all the ID's in the Grid. I have done this in VB but now need to convert it to C# and m having a bit of trouble with it. It would be a bit simpler but I actually use the SID column as a link to each person's profile, so it's not as simple as somethinging like:
OwnerTableView.Columns.FindByUniqueName("SID").ToString(); (If I do this I get "<a href=/default.aspx?sid=XXXX>XXXX </a>" as the value, when I only want the XXXX part.
This is what I use in VB to make the string, I use the Data key values (which is the SID field).
Session("sidlist") = Nothing
Dim SID_ListNewStudents As StringBuilder = New StringBuilder()
For Each item As Telerik.Web.UI.GridDataItem In SelectedGrid.MasterTableView.Items
SID_ListNewStudents.Append(item.OwnerTableView.DataKeyValues(item.DataSetIndex).Values(0))
SID_ListNewStudents.Append(", ")
Next
Any help would be great, Thanks!