Click here to Skip to main content
15,924,318 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for create panel type of cell,
which type of defaultcelltype class should be inherit?

VB
Public Class ASplitCell
    Inherits 
             DataGridViewTextBoxCell
      or     DataGridViewComboBoxCell
      or     DataGridViewCheckBoxCell
      or     DataGridViewImageCell


please suggest.
Posted
Comments
ZurdoDev 29-Jun-12 9:37am    
I cannot understand your question. Please explain in clear English.
Aarti Meswania 29-Jun-12 9:47am    
I want to display my usercontrol in datagrid view cell

when i click or press tab key and enter in cell My usercontrol is shown there but as I leave that cell my usercontrol goes invisible and a normal textbox cell is displayed there

I don't want to click/press tab I want to see my usercontrol in all cells onload event
Aarti Meswania 29-Jun-12 9:51am    
give me your mailid, I will send you snapshots of the custom column problem.
ZurdoDev 29-Jun-12 10:02am    
No, use the improve question link and add them to the question.

None of the above. Your problem is that you are creating a custom data grid view column, but you are forgetting that each column displays cells in one of two modes. The first is Display mode, where a class shows it's data in a presentation format. The second is Edit mode where the displayed contents of the cell are replaced with an editing control that another class that you write provides.

Read this[^], this[^], this[^], and this[^].

Unless you can show your data in one of the standard column types, you'll be inheriting from DataGridViewColumn and making your custom column from scratch.
 
Share this answer
 
Comments
Aarti Meswania 30-Jun-12 1:18am    
In edit-mode I got usercontrol with in cell, so what should I do to get my usercontrol in cell in display-mode also. Is it only a way to achieve this by painting cell?
Dave Kreskowiak 30-Jun-12 10:01am    
I already told you what to read and YES, it's the only way.
I have used table layout panel gives look like grid.
and accept any control in single cell.
there are no display regarding issues like grid-cell [view-mode & edit-mode].
 
Share this answer
 
v2

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