It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP 7 7023
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
Ok,
So what is the exception that it gives?
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
>What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h48g2000cwc.goo glegroups.com.. .
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
Chris, Hier you are:
System.InvalidO perationExcepti on was unhandeld
Row associated with the currency manager's position cannot be made
invisible.
And hier the explanation:
An InvalidOperatio nException exception is thrown in cases when the
failure to invoke a method is caused by a reason other than an invalid
argument. This may be thrown by .NET Framework methods when the
underlying Win32 method cannot be invoked.
I hope that this says more to you then to me :)
ChrisM schreef:
Ok,
So what is the exception that it gives?
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
I'm partially guessing here, but it seems to be saying that you cannot make
the currently selected row invisible, or more specifially the row that the
pointer is currently on.
You could try using
dgrDeellevering en.CurrentRowIn dex = x;
Before your loop that sets the visible property.
Where x is a row that you ARE NOT going to make hidden.
From what it seems to be saying, I don't think it's possible to hide ALL the
rows in the table...(?)
You will have to leave at least one row visible (the row the CurrentRowIndex
needs to be pointing at).
HTH??
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
>
Chris, Hier you are:
System.InvalidO perationExcepti on was unhandeld
Row associated with the currency manager's position cannot be made
invisible.
And hier the explanation:
An InvalidOperatio nException exception is thrown in cases when the
failure to invoke a method is caused by a reason other than an invalid
argument. This may be thrown by .NET Framework methods when the
underlying Win32 method cannot be invoked.
I hope that this says more to you then to me :)
ChrisM schreef:
>Ok,
So what is the exception that it gives?
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h54g2000cwb.goo glegroups.com.. .
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h48g2000cwc.goo glegroups.com.. .
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
Thanks a lot Chris,
You seem to be a guru ;)
ChrisM schreef:
I'm partially guessing here, but it seems to be saying that you cannot make
the currently selected row invisible, or more specifially the row that the
pointer is currently on.
You could try using
dgrDeellevering en.CurrentRowIn dex = x;
Before your loop that sets the visible property.
Where x is a row that you ARE NOT going to make hidden.
From what it seems to be saying, I don't think it's possible to hide ALL the
rows in the table...(?)
You will have to leave at least one row visible (the row the CurrentRowIndex
needs to be pointing at).
HTH??
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
Chris, Hier you are:
System.InvalidO perationExcepti on was unhandeld
Row associated with the currency manager's position cannot be made
invisible.
And hier the explanation:
An InvalidOperatio nException exception is thrown in cases when the
failure to invoke a method is caused by a reason other than an invalid
argument. This may be thrown by .NET Framework methods when the
underlying Win32 method cannot be invoked.
I hope that this says more to you then to me :)
ChrisM schreef:
Ok,
So what is the exception that it gives?
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
As long as it's the last Row it makes it invisible but whene the next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
It's easy to make the last row in a datagrid (filled with a table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP
Heh!
Wish I was. Just had a quite few run-ins with the DataGrid. The application
I spend most of my time developing/supporting uses it a lot... and I still
hate it(the datagrid, not my application).
So hard to make it do the simplest of tasks most of the time...
Chris.
"Nader" <na**********@g mail.comwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
Thanks a lot Chris,
You seem to be a guru ;)
ChrisM schreef:
>I'm partially guessing here, but it seems to be saying that you cannot make the currently selected row invisible, or more specifially the row that the pointer is currently on.
You could try using
dgrDeelleverin gen.CurrentRowI ndex = x;
Before your loop that sets the visible property.
Where x is a row that you ARE NOT going to make hidden.
From what it seems to be saying, I don't think it's possible to hide ALL the rows in the table...(?) You will have to leave at least one row visible (the row the CurrentRowInde x needs to be pointing at).
HTH??
Chris.
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h54g2000cwb.goo glegroups.com.. .
>
Chris, Hier you are:
System.InvalidO perationExcepti on was unhandeld
Row associated with the currency manager's position cannot be made
invisible.
And hier the explanation:
An InvalidOperatio nException exception is thrown in cases when the
failure to invoke a method is caused by a reason other than an invalid
argument. This may be thrown by .NET Framework methods when the
underlying Win32 method cannot be invoked.
I hope that this says more to you then to me :)
ChrisM schreef:
Ok,
So what is the exception that it gives?
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h54g2000cwb.goo glegroups.com.. .
As long as it's the last Row it makes it invisible but whene the
next
Row comes it gives an exception.
ChrisM schreef:
What actually goes wrong?
Cheers,
Chris.
"Nader" <na**********@g mail.comwrote in message news:11******* **************@ h48g2000cwc.goo glegroups.com.. .
It's easy to make the last row in a datagrid (filled with a
table)
invisible:
datagridObject. Rows[i].Visible = false
BUT if 'i' is not the last row then things go wrong.
I even tried:
for (int i = datagridObject. Rows.Count - 1; i >= 0; i-- )
{
dgrDeellevering en.Rows[i].Visible = false;
}
And it doesn't want to work.
Someone please HELP This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Billy Jacobs |
last post by:
I am using a datagrid to display some data. I need to
create 2 header rows for this grid with columns of
varying spans. In html it would be the following.
<Table>
<tr>
<td colspan=8>Official Impact Summary</td>
</tr>
<tr>
<td colspan=2></td>
|
by: Glenn Owens |
last post by:
I have a DataGrid web control which I've dynamically populated with
template columns to be used for bulk-editting. Generally, all of the
columns are textbox and/or dropdownlist child controls.
Currently everything is working. I can find the updated rows/columns
by parsing the posted data collection against the DataGrid DataSource.
However, when there is a large amount of DataGridItems (rows) the
update processing can take a while.
...
|
by: Andrew |
last post by:
Hey all,
I am very new to ASP.Net (and .Net in general), but that isn't stopping the
boss from wanting to begin new projects in it. This latest project has me
kinda stumped and after a couple days of struggling, I figure asking you all
(the experts) will keep me from going down some dark and dangerous road.
The project I have is a fairly simple one, in theory anyway. The gist is to
create a page where the user enters an IDNumber,...
|
by: Richard |
last post by:
After printing a userlist to a Datagrid i want some names not to be shown. I
want to know how i can make a entire datagrid row invisible.
I suspect its something with the OnItemDatabound but i am kinda stuck there.
but this is basicly what i want.
if Username = "Deleted_User" then
'make entire table row invisible.
End if
|
by: John Blair |
last post by:
Hi,
Code attached but the line that gives me an error is
MyDataGrid.Columns(2).Visible = False
It actually gives me an error for any value instead of 2 even when 9 bound
columns of data exist. How do i hide a column? Thanks.
MyConnection = New
SqlConnection("server=(local);database=pubs;Trusted_Connection=yes")
MyCommand = New SqlDataAdapter("select * from Authors",
| |
by: NH |
last post by:
Hi,
I just cannot get this to work. I want to make a cell editable in a datagrid
only if the value of another cell is something specific.
I am able to capture the value of the other cell via the ItemDataBound event
of the datagrid e.g.
If e.Item.Cells(8).Text = "2" Then
'Make the textbox defined in my edititemtemplate read only of invisible
End If
|
by: Dave Edwards |
last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot
figure out how to fill a dataset with the same query but run against
multiple SQL servers, the query , table structure and username, password etc
will be exactly the same for each server, the only thing that will change is
the server name. Idealy I would like to get the server names from a seperate
dataset so there could be any number of servers, allthough in...
|
by: Phillip N Rounds |
last post by:
I have a DataGrid in a web form (ASP1.1, C#, VS 2003) that I'm trying to add
some functionality to, and I can't figure out how to do int.
The existing DataGrid has several databound columns and a Template Columns,
into which I put buttons. When the user clicks on the 'Do It' button, the
selection is recorded in an underlying database, and (almost) everything is
fine. One thing I would like to improve in the existing version concerns...
|
by: Nader |
last post by:
Making the last row is easy:
datagridObject.Rows.Visible = false
But if it's not the last row then it goes wrong! :(
I tried the next:
for (int i = datagridObject.Rows.Count - 1; i >= 0; i-- )
{
dgrDeelleveringen.Rows.Visible = false;
|
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,...
|
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...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |