.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Presenting Data with the DataGridView Control in .NET 2.0 > Defining Custom Column and Cell

Posted By: Balwant     Posted Date: February 25, 2011    Points: 2   Category :Windows Application
in this link u can find the explanation about how to bind image column at run time.

View Complete Post

More Related Resource Links

Extend ASP.NET: Simplify Data Binding In ASP.NET 2.0 With Our Custom Control


The wwDataBinder control addresses simple control data binding--binding simple form controls like textboxes, checkboxes, and the selected values of list controls to individual data or object values.

Rick Strahl

MSDN Magazine December 2006

Cutting Edge: Custom Data Control Fields


In ASP. NET 2. 0, the GridView and DetailsView controls are designed to work together. They don't merely provide complementary services, they also share a number of helper classes and components. The output of the GridView control consists of a sequence of rows, each with a fixed number of columns.

Dino Esposito

MSDN Magazine January 2006

To create a custom control and type while creating a column


HI All,

i am creating a column in the list while creating a column i will have an option for choice field on selecting choice i can see dropdown, radiobutton, Checkbox to select and  can enter list of values. and on clicking ok i will get a column with radiobutton. in newform.aspx and also in editform.aspx

so i need to create the similar functionality with my custom radio button, so on create column i need to show my custom choce on selecting this i need to show my custom radiobutton  and  can enter list of values then on selecting it then click ok to create a column, in edit form and new form i need to show a radio buttons with values.

Thanks in advance




Best way to display data of a single column from a Sharepoint Custom List

I'm trying to create pages that will automatically populate with data pulled from a sharepoint list (like title, department, contact info, etc.).   I'm using publishing pages. What would be the easiest way to do this, and how would I specify which data to pull from the list? For example, the page would be set up like this: [Title:biology] [Department:biology] [Contact Info:biology]   and when the page loads, it would look like this: Biology Lab Biology Department 123-456-7890   I want it to just pull the data -- I don't want a list view or anything like that.  I need this page to look pretty, and I need the each column's data to show up in a very specific place. How could I make pages that would do that?

How to make a DataGridView Cell/Column not enterable / selecatble

Hi, I am trying to make a Column in a DataGridView non-entaerable (the user should not be able to set focus to the cell neither using the mouse nor the keyboard). I already tried to change the CurrentCell property in the CellStateChanged. But in this event-handler the CurrenCell is the "old" one; setting it to any value doesn't help, because the value is set after calling this procedure. In Delphi there is an event-handler for entering a cell, where you can tell whether the user is allowed to enter a cell. Is there anything comparable in C#? Any other suggestions?

datagridview add data a column at a time

How do I add to a datagridview a column at a time? I see at http://msdn.microsoft.com/en-us/library/5s3ce6k8.aspx that it is possible to do it a row at a time. I was looking for something similar.      

How to create custom control in .net which can retrive data from sharepoint list and redirect to sit


Hi help me!

I am strugling this problem!

My requirement is I need to create a custom control which need to retrive data from sharepoint list, The list contain some sites information like Title, url, Scope my requirement is i need to display sites Title in my custom control and when i click on title (site name) in custom control it need to be redirect to that site and whenever list data updated automaticaly custom control data also need to be apdated automatically .

How to Disable Specific Column in Data Grid View and write something in Cell and load data in anothe


Hello All  ,

i have data grid view and i want to disable specific column from writing in it and in another column 

i want to write something like item code and load the item name automatically in the corresponding cell in the disabled column 

i hope that i write my problem correctly and you can understand what i want :)

thanks in advance ,

Kareem Naguib

DataGridView & Custom cell painting


I'm creating a schedule using a datagridview.  The cells in the grid need a lot of special behavour so I created my own Column and Cell classes.  In the Cell.Paint method I draw the cell text in various colors, draw images and lines, depending on data values.

My question is this:  What is the correct order to draw parts of the cell using the DataGridViewPaintParts?  Does it matter?  At present, the display is horrid - sometimes the cells are transparent (I can see what's underneath the application) and the text is scrambled.  A really good example of how to paint a cell would be great!


rendering a CheckBox web control from Oracle NVARCHAR2 (1) data column


I have a data column in Oracle as NULLABLE NVARCHAR2 (1) which accepts Y for True or N for False and nulls. 

When I have Dynamic Data to render this column, it renders it as a TextBox web control.

Is there a way to make Dynamic Data to render it as a CheckBox web control?


SharePoint 2010- Custom Fields Like Rating Control- Need Suggestion on Saving Data


Hi All,

I am in process of Developing a Custom Field for Rating control. Requirements are below.

1) This field will be used for Creating survey

2) It will be called Rating control with Attribute ( some enhancement over out of box rating control)

3) Respondent will rate each attribute for 1 question like

                Action: 3

                Comedy: 5

                Thriller: 7

I need suggestion on  How to save data for above Requirements. I have designed control and it works fine. Only thing I need help on How to and Where to Save data related to answer?


Thanks in Advance



Pathik Rawal Blog: http://pathikhrawal.wordpress.com

DataGridView object column 'data type' assignment

How do I assign a 'data type' to an 'unbounded' datagridview object

Custom Display in Data View column in SharePoint



I am using SharePoint designer 2007 to create Data View web part where I want custom display text in one column depending upon condition. In designer there is way to implement custom display which allows to change style conditionally. Is there any way to change the text conditionally?

Just to underline the problem I want to change text in Data View column conditionally.



Custom list -- control issue with column type "Choice" and Infopath 2010

I finally got our project lead to abandon external SQL lists, so now I've created custom lists in SP 2010. I have some columns that are of "Choice" type/"Display as radio buttons" (customer requirement). When I start Infopath 2010 locally and create the data connections to the list(s), those choice fields display in I/P as dropdowns. If I change the control with a right-click to "Option Button", I only get one -- I need 2 (yes, no) or, in a few upcoming cases 3 or 4. BTW, same with changing the control to a check box -- only get 1. FWIW, I get the same results if I start Infopath directly from the list in SP Designer 2010. Any ideas?
Joel W. Johnson

How To configure Asp.net Login name control with list column Data Field?



I am trying to access site username and insert that name into list

I am trying to configure asp.net login name control with list column but for that control not having any property to configure that with list column

Is there any solution to configure asp.net control with list column by using sharepoint designer 2010?



How to merge two columns data into a third column (text fields) in a custom list? is it possible to



I am wokring with MOSS 2007 environment.

In one of the sites I have a custom list which has the following columns

1. Report Title - Hyperlink

2. Description - Multiple lines

3. Created date - date


The requirement is to merge the "Report Title and Description" and show it in a third column which will be inlcuded in the custom view.

Report Title                           Decsription                                                                Created date

XYZ                           Test Report which needs to be deployed                 01/01/2011


This needs

Defining a custom style for a derived DataGrid

Hi all, Please tell me what I could be missing here. I am trying to define a very basic style for a derived DataGrid and it doesn't seem to take! In my dll project, I have this in the Generic.xaml: <Style TargetType="{x:Type local:MyDataGrid1}" BasedOn="{StaticResource {x:Type DataGrid}}"> <Setter Property="RowBackground" Value="#AAEAEFF4"/> <Setter Property="AlternatingRowBackground" Value="#00FFFFFF"/> </Style>  .. and this is how the derived grid is currently (pretty empty until I have this figured out): public class MyDataGrid1 : DataGrid   {     static MyDataGrid1()     {       DefaultStyleKeyProperty.OverrideMetadata(typeof(MyDataGrid1), new FrameworkPropertyMetadata(typeof(MyDataGrid1)));     }   } And in my Sample App's MainPage.xaml, I simply have this: <mygrids:MyDataGrid1 x:Name="dataGrid1" /> But, the alternating colors are not applied! Interestingly, in debugger I see that the properties are set to these values in this instance, but the for some reason while rendering, these values were not used! Please help. Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend