|
I want to make a column in gridview invisible at runtime....
i want the gridview to show the data in table on page load itself....
anyone please help me........
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Fire the query on page load and fill the dataset and the add this dataset to gridview datasource and the Bind it.
For making invisible column u can use gridview.columns(0).Visibale= false.
Hope it helps u????
|
|
|
|
|
i used ur code after the line
GridView.DataBind();
but its not working....actually i want to make invisible a single column only
like say.....
State
-----
karnataka
tamil nadu
delhi
i wanna make the whole column state invisible during page load....other columns shud be there.....with values ....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Use DataKeyNames to hide the columns..
|
|
|
|
|
Hi,
1. To make gridview column invisible
gv.Columns[columnindex].Visible = false;
2.i want the gridview to show the data in table
//Not getting the exact requirement. Confused!!!!!!!!!!!!!!!!!!
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
i used ur code after the line
GridView.DataBind();
but its not working....actually i want to make invisible a single column only
like say.....
State
-----
karnataka
tamil nadu
delhi
i wanna make the whole column state invisible during page load....other columns shud be there.....with values ....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
HI,
Did u get any exception?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
i can be more specific now....
the data is bind..
columns in database
State district
----- --------
karnataka bangalore
Uttarpradesh lucknow
i want to make invisible the column district....
how should i give the column index...
plz help,,,,,,
i am not getting it...
GridView2.Columns[].Visible = false;
inside the column index what no is to be given
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
The meaning of column index is position of the column. In your case it will be 0. Put 0 in column index and that will be invisible.
Apurva Kaushal
|
|
|
|
|
i am getting error if i put zero in column index....
the error is
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
wats happning..?
i need to populate values from other columns to textboxes ....
i need help plz..
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Can you post some part of your code to make the things clear. BTW the error says that you are pointing to a non existing column.
Apurva Kaushal
|
|
|
|
|
Write GridView1.Column(ColumnIndex).Visible = True/False in the DataBound Event of GridView.
|
|
|
|
|
Try this,
GridView1.Columns(index).visible=false
It works for Sure.
|
|
|
|
|
Hi,
I have designed a web page in asp.net 2.0 (registration form) and placed some validations (Reg exp., required field etc.) in it. I have set these validation using the properties. All the validations are working fine when I click continue.
PROBLEM is these validations are firing for all button clicks placed on form. I want to restrict these validation to fire only when i click continue button.
Please help.
Regards,
~JJ
|
|
|
|
|
Hi,
Set all other buttons' CausesValidation property to "False".
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Thank u Chetan Ranpariya... Its working fine now.
~JJ
|
|
|
|
|
Hi
I hve created an online project using .NET 2003,Now I hve converted it to .NET 2005 (I am new to .NET2005) But when i converted it to 2005 the .dll is not in the bin folder.
I tried to create an ASP.NET web project its showing APP_code folder, aspx and aspx.vb pages, and web.config. There is now global.aspx, bin folder etc. In that also there is no dll created. Wht happen to the dll and also what is this APP_code's purpose.
When i debug my application using .NET 2005 the "http://localhost:1088/myproj/login.aspx" I hve created virtual directory but the port no is changing each time i debug the project how can i solve that
earlier i hve to type http://localhost/myproj/login.aspx
Can pls any body help me to solve this prblem its very important
Thanks in Advance
With regards
Anitha
|
|
|
|
|
The app_code is for putting classes you want compiled. Your pages do not get turned into a dll in 2005.
I recommend that if it's urgent ( and most things here are ), you try doing a google to read up on changes in 2005.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
micydon wrote: Wht happen to the dll and also what is this APP_code's purpose.
In VS2005, Dll's won't be created automatically like VS2003. App_Code folder contains the classes that are needed for your site.
micydon wrote: When i debug my application using .NET 2005 the "http://localhost:1088/myproj/login.aspx" I hve created virtual directory but the port no is changing each time i debug the project how can i solve that
earlier i hve to type http://localhost/myproj/login.aspx
Typing http://localhost/myproj/login.aspx is old method. You can do this in VS2005 by creating a new website, don't go for filesystem based application
|
|
|
|
|
Hi All,
I am developing a web base Project named MailProject where I have to read mails form outlook and do some manipulation on return mails. I need to add this project dll to another project of mine.
My problem is that how will I the data of that form (MailProject) in another project??
Please help me...
Thanks in advances...
|
|
|
|
|
ASP.NET 2.0 wrote: I need to add this project dll to another project of mine.
Add reference to the previous project dll in the new project.
ASP.NET 2.0 wrote: My problem is that how will I the data of that form (MailProject) in another project??
What do you mean by this ?
|
|
|
|
|
After adding dll how will I use that form, I mean how will I come to know that form is executing???
|
|
|
|
|
hello everyone,
I have a doubt regarding a WebGrid.
I have WebGrid and i have also a deletebutton in that webgrid.So now i need to delete to a row in that webgrid using Javascript.When deleting only that row need to be deleted but not from the database but just in the webgrid.
plz help me in doing this.This is very urgent for me.
Thank q,
Murali
Murali
|
|
|
|
|
If ur web grid is nothing but GridView then on DataBound Event add this code:
If e.Row.RowType = DataControlRowType.DataRow Or e.Row.RowType = DataControlRowType.Separator Then
Dim cntrl As ImageButton
cntrl = CType(e.Row.FindControl("Delete"), ImageButton)
If Not cntrl Is Nothing Then
cntrl.Attributes.Add("onclick", "if (confirm('Do you want to Delete this record?')== false) return false;")
End If
End If
Hope this helps u???
|
|
|
|
|
Hi,
Try the following javascript code.
function DeleteRow()
{
var dg = document.getElementById("yourwebgridid");
var child = dg.childNodes[0].childNodes[rowindextodelete];
dg.childNodes[0].removeChild(child);
}
Call above function from your html button's click event.
<input type="Button" id="bttn" name="bttn" value="Delete" onclick="DeleteRow();" />
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|