473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Casting DataGridItem.findcontrol("deletethis") to CheckBox

this peace of code is giving me trouble

DIM i as DataGridItem

for each i in myDataGrid
checkbox chkbox = Ctype(i.findcontrol("deletethis"),checkbox)

if(chkbox.checked) then
......
.....

Compiler Error: Value of type 'System.Web.UI.Control' cannot be converted to
'System.Windows.Forms.CheckBox'.

How can I overcome this, i need to be able to see if the checkbox is checked
or not.
Thanx

Nov 20 '05 #1
1 2829
Hi Samuel,

|| this peace of code is giving me trouble

Rephrased:
this trouble of code is giving me no peace :-(
That's because there's a
System.Web.UI.WebControls.CheckBox
and then there's a
System.Windows.Forms.CheckBox

Your app is thinking in terms of System.Windows.Forms.

Is this a Windows app or a Web app?

Regards,
Fergus
Nov 20 '05 #2

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

Similar topics

3
by: Randy | last post by:
Hello, I'm creating a table on the fly that is used by a datagrid. I'm also creating a tableStyle that is used for the datagrid to make it look like I want. I'm using the DataGridBoolColumn to...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
2
by: buran | last post by:
Dear ASP.NET Programmers, I have the following problem. I have a datagrid (ID: grdAllActions). This datagrid has two template columns: one column with the dropdownlist control (ID: ddlPS) and...
7
by: Lars Netzel | last post by:
If I put a checkbox in a datagrid (ASP.NET) and set the Autopostback to true I can catch OnChange event on checkbox but how do I then catch what DataGridItemIndex is? Can I use some Event in the...
5
by: TPS | last post by:
I have a checkbox column in my datagrid. This checkbox triggers an autopostback. When I postback, I need to tell what row the user is on so I can tell what check box was checked or unchecked. ...
2
by: Maziar Aflatoun | last post by:
Hi everyone, I am reading and displaying data rows from my database where the first column contains the Status checkbox. I like to enable my users to change the status of individual rows by...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
1
by: fabrice | last post by:
Hello I have a little problem with casting in a Datagrid Control. I'm using Option Strict in my web application. In a Template Column, I put in an ImageButton Control with a Command...
0
by: emansc | last post by:
salamu alikom all, i inserted checkbox in a datagrid by using template column but in the run time, when i try to check any row & then click on a delete button,this row didn't deleted. i tried to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.