-
December 4th, 2012, 11:31 PM
#1
Linq To Dataset
Hi
i have the Dataset which contains the record from the back end , i need to remove last character of
the column attribute
E g: Dataset second column
1234567X
kumarA
CPUD
out put i need
1234567
kumar
CPU
Currently i am doing
var query = Get_X_A_B_C_Obj.AsEnumerable()
.OrderBy(x => x.Field<string>("Columnname").Substring(0, 4))
.ThenBy(x => x.Field<string>("Columnname").Substring(5));
var dt = query.CopyToDataTable<DataRow>();
but i am not getting
Can any one please suggest/help me on it ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|