473,715 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding custom control in DataGrid

Hi,

I would like to display a Checkbox and a string value in each cell of
DataGrid. I am trying to bind it with Custom user control consist of a
Textbox and a check box. The size of DataGrid (both rows and columns) are not
of fixed size. I am using Visual Studio 2002/2003 IDE for development. Are
there any extra feature for this availble in VS 2005?

Thanking you.
Dec 28 '05 #1
2 5245
Mandar B,

In .NET 2.0 (which VS.NET 2005 is the IDE for), you can use the
DataGridView, which has a different model, and makes it easier to host
custom controls in columns.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Mandar B" <Mandar B@discussions.m icrosoft.com> wrote in message
news:D7******** *************** ***********@mic rosoft.com...
Hi,

I would like to display a Checkbox and a string value in each cell of
DataGrid. I am trying to bind it with Custom user control consist of a
Textbox and a check box. The size of DataGrid (both rows and columns) are
not
of fixed size. I am using Visual Studio 2002/2003 IDE for development. Are
there any extra feature for this availble in VS 2005?

Thanking you.

Dec 28 '05 #2
Thank you very much Nicholas for reply.
But VS.Net 2005 is not possible right now. In that case, is it possible to
use DataGridView with .Net 2.0 installed on Windows XP with VS.Net 2003 IDE?
Is there any other solutions to this issue?

Thanks & Regards,
Mandar B

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mandar B,

In .NET 2.0 (which VS.NET 2005 is the IDE for), you can use the
DataGridView, which has a different model, and makes it easier to host
custom controls in columns.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Mandar B" <Mandar B@discussions.m icrosoft.com> wrote in message
news:D7******** *************** ***********@mic rosoft.com...
Hi,

I would like to display a Checkbox and a string value in each cell of
DataGrid. I am trying to bind it with Custom user control consist of a
Textbox and a check box. The size of DataGrid (both rows and columns) are
not
of fixed size. I am using Visual Studio 2002/2003 IDE for development. Are
there any extra feature for this availble in VS 2005?

Thanking you.


Dec 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2013
by: HKM | last post by:
Hello ! I have extended DataGrid Control as per my requirements. My questions is how to add this Custom Data Grid to the Form (that I want this customized grid to appear). Following are the blocks of code. public class CustomDataGrid : DataGrid { public CustomDataGrid()
4
1743
by: Chris | last post by:
I think I must be going crazy. All I want to do is add a button to the bottom of a datagrid which will later run some code for a web based project. I've created a custom control that inherits from the datagrid and have added just a single line of code thus; protected override void Render(HtmlTextWriter output) { output.Write(new System.Web.UI.WebControls.Button());
3
4878
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
0
1261
by: sonic | last post by:
hello, I have this custom datagrid control, that inherits from DataGrid. In addition to datagrid, I am adding a "status" table under it, and another html button, which will trigger a new row. My problem is that the events associated with the custom button do not trigger every time. I am adding my button as private global control inside of override CreateChildControls(), and than calling _myButton.Render( writer )
1
1503
by: Sam Samnah | last post by:
Hi Everyone. It has been a long time since my last post. Nevertheless, I have built a custom server control that allows a user to edit text, bolding, italics strike though table insertion and manipulation etc etc. The control works perfectly when placed outside a templated control but when placed in, for instance, a datagrid EditItemTemplate, I get the following error on the DataBind Method: the dreaded "Object not set to a referance"...
1
4233
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get the example to work. I created the following two classes, provided with the example: *-*-**-*-*-*-*-*-*-*-*-*-**-*-*-*-*-CheckBoxColumn Class:-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-**-*-*-*
1
3856
by: Robert Batt | last post by:
hello, I would like to add a rich text box to a datagrid. does anyone know of any code samples, or any other way where I can display a field in a datagrid and allow the user to click on it and enter a large amount of text, without the datagrid showing all the text in the grid. Thanx in advance Robert
3
3150
by: Fao, Sean | last post by:
I have a DataGrid that I'm adding CheckBox controls to at runtime (in the code behind) and I'm not sure if I'm doing it correctly. First of all, I noticed that the MyDataGrid.Columns.Add() method expects a DataGridColumn so I instantiated an object of type TemplateColumn that I had hoped I could add a CheckBox to. I soon discovered that the ItemTemplate property of the TemplateColumn class returned an object that had implemented the...
1
1441
by: rn5a | last post by:
I have created a custom server control which is actually a Button clicking which prompts a user with a JavaScript confirm message asking him whether he would like to proceed or not. If he clicks *OK' in the confirm box, he is taken to the next page. If he clicks *Cancel* in the confirm box, he stays on that page itself. I have a Web Form which houses a DataGrid. To edit the data in the DataGrid, I am using <asp:EditCommandColumn/>. To...
0
8718
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3174
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2118
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.