Click here to Skip to main content
15,908,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
how can i convert binding column into grid view to int
i have template filed this
Text=<'%# Bind("lastid")%'> i need to bind grid view by column "lastid" +1
for each row
Posted

Another way, you cab have a public function at server side that returns the modified ID and that can be placed as
<%# GetUpdatedId("lastid") %>
 
Share this answer
 
Why don't you directly do that in the query itself? Pass on 'LastID+1" in the query and you don't need to worry about it.

OR

You can modify the datatable before binding the grid.
 
Share this answer
 
Comments
Sandeep Mewara 29-Jan-11 8:35am    
Just a thought, check if this works:
Text=(Convert.ToInt32(<'%# Bind("lastid")%'>) +1).ToString();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900