How do you customize the column content inside the datagrid?
Answers were Sorted based on User's Feedback
Answer / bhanu
1.Right click on the datagrid
2.click property builder
3.A datagrid properties window is opened.u will find few
options on left side like general,column,paging,format.
4.double click on coloumn u will get boundcolumn,button
coloumn ,hyperlink column,template coloumn.
5.right click on template column of datagrid u will get
edit template and go for coloumn(0).
6. drag & drop the control from the toolbox u needed in
edit template.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / ashutosh rai
We will add a function signature of OnItemDataBind in
DataGrid or by creating an event handler in code file for
DataGrid Binding. Now in the definition of function we will
check that is DataGrid Item type is of ListItemType or
AlternatingItemType then we will costomize the column by
setting the property of particular column in code window.
for eg.
event handler of funcion:
this.DataGrid.ItemDataBound += new
system.Web.UI.WebControls.DataGridItemEventHandler(this.DataGrid_ItemDataBound);
definition of function:
private void DataGrid_ItemDataBound(object sender,
DataGridItemEventArgs e)
{
if (e.Item.ItemType ==
ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
e.Item.Cells[1].Font.Bold;
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
where we are using NEW keyword other than create instance Pls Help me? Gopal
How do you customize the column content inside the datagrid?
Is it possible to save view state on the web server?
What is the use of stretch property in Image control?
We are facing problem with the compatibilty of IE 7 and IE 6.We are calling a showModal window that is working fine in IE6 but with IE7 it opens a new Window and Data is not getting poputaled.In some pages it Gives an error "The webpage you are viewing is trying to Close the window.Do you want to close this window".
What is form technology?
write a program to create login form
Clear property is available in which control?
Which property of the progressbar control specifies the amount to increment the current value of the control?
What are ACID properties of a transaction in DBMS (Database Management System)?
What are the different cloud platforms?
Suppose I have two combobox .. And I have some items in both combobox now I need to check the item in both combobox if same item is present in both combobox I need to display that item in message box?