Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I remove a column from a datagrid while the data is from sql database +

Example : I have 6 items in sqltable so i want do add purchase button next to each item how can i do this ?
Posted
Updated 28-Dec-11 3:38am
v2
Comments
Wendelius 28-Dec-11 9:38am    
Unnecessary pre tags removed
nbeiruty 28-Dec-11 9:42am    
are u sure Md. Mika that this is not sure, cuz after a while they are goin to ask me to provide the code :S
Wendelius 28-Dec-11 13:23pm    
Yes I'm sure. If you add pre tags arounf normal text it makes it hard to read. Pre tags are supposed to use for code.

1 solution

You can directly removed the named column from the datatable in the codebehind before binding it to the datagrid.

Secondly, you can add the Purchase button in the ItemTemplate so that it will be rendered for each row in the datagrid.
 
Share this answer
 
Comments
nbeiruty 28-Dec-11 9:39am    
'<sdk:datagrid height="211" horizontalalignment="Left" margin="116,195,0,0" name="dg" verticalalignment="Top" width="846" selectionchanged="dg_SelectionChanged">'
how can i do this itemtemplate ???
Thank You In Advance.

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