|
good day if my first question is hard to understand...
how to make a bound column into a buttom Column / or link column?
thanks
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
Do u want to display data from the datasour in the text property of button or link?
if yes then you can create <asp:buttonfield> column as following
<asp:ButtonField ButtonType="link" DataTextField="fieldname" CommandName="commandname"/>
This will display a linkbutton column with the text property from "fieldname" column from the datasource.
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Sir thank you it gives me an idea..
but this is not what i wanted although its close to it...
i have 3 columns with databounds, and i want the first column to have a capability of link or same as button field...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
You can order your columns as u want by making "autogenerantecolumns" propertry of gridview to false and creating your column in order whatever u want.
see the following example.
<asp:GridView runat="server" ID="gv" AutoGenerateColumns="false">
<Columns>
<asp:ButtonField ButtonType="link" DataTextField="username"/>
<asp:BoundField DataField="username" />
<asp:BoundField DataField="password" />
</Columns>
</asp:GridView>
Here the first column will have a link button and next two column will just display data.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
good day to everyone im new to asp.net and using a 2005 version
i need help on how to set a buttonColumn to any column on my grid in asp.net2005...
i used this inserted this code :
<--! ButtonColumn CommandName="select" HeaderText="Employee"
''' DataTextField="EmployeeName" /> -->
i encounter this error:
Parser Error Message: System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'. 'asp:ButtonColumn' is of type 'System.Web.UI.WebControls.ButtonColumn'.
anyone, pls i need help
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
I dont know is this your are expecting.
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:ButtonField ButtonType="Button" Text="Button" />
</Columns>
</asp:GridView>
if not, specify what you are trying to do.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
to be simple i had three columns in my gridview and all three columns had bound values / data...
the thing that i wanted to do is how to make the first column that has bound data into a buttonColumn for selection?
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: bound data into a buttonColumn for selection
Can You explain this?
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:CommandField ButtonType="Button" ShowSelectButton="True" />
</Columns>
</asp:GridView>
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
this helps but this code adds a new control button..
i want to make use one of my three columns that is already displayed on the gridview... and change it to be an hyperlink to button select....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Oh.. I See
What you should do is
convert field in to a template field.
Add watever controls you need in to the template field.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
How to list field heading / column headings when there is no records in the case of gridview listing of data.
Thank you
vijaya
vijaya
|
|
|
|
|
In the function that gets the data, check the count of the rows, and if its = 0 add a blank dummy row:
if (myTable.Rows.Count==0)
{
DataRow myNewRow = myTable.NewRow();
myTable.Rows.Add(myNewRow);
}
|
|
|
|
|
i am not getting it so i used this mehtod but
how to implement it in BLL ?
if (GridView1.Rows.Count == 0)
{
GridView1.DataSource = mylist.GetAdapter("SELECT 'COMPCD', 'COMPNM', 'CORPADD','CORPCITY' FROM Dual ");
GridView1.ShowHeader = false;
}
GridView1.DataBind();
vijaya
|
|
|
|
|
i want to set the connect string in webconfig file at run time.my sanrio is than when my web page load that server name read from note paid and than write in webconfig file'
is it possible?
<add key="dbcon" value="Persist Security Info=False;User ID=sa;password=sa;Initial Catalog=RMS;Data Source=varServerName">
suahil shahab
|
|
|
|
|
well budy can't understand why you want to do this...
|
|
|
|
|
If you change the web.config file at runtime, the web application will be restarted.
What is it that you want to accomplish?
---
single minded; short sighted; long gone;
|
|
|
|
|
You can write... But when you change the web.config, the application will compiled again by MSIL by the ASP.NET. So all the sessions will be destoryed...
Example:
Dim config As System.Configuration.Configuration<br />
Dim appSetting As New System.Configuration.AppSettingsSection<br />
<br />
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~")<br />
appSetting = config.GetSection("appSettings")<br />
<br />
'To add new key<br />
appSetting.Settings.Add("[KEY_NAME]", "[VALUE]")<br />
<br />
'To change exists key<br />
appSetting.Settings("[KEY_NAME]").Value = "[VALUE]"<br />
<br />
<br />
config.Save()
|
|
|
|
|
i want same code that u define. when i use this code it give error in
in following line plz guide me.i have imports System.configuraton
Dim config As System.Configuration.Configuration
Dim appSetting As New System.Configuration.AppSettingsSection
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~")
appSetting = config.GetSection("appSettings")
suhail shabab
|
|
|
|
|
Can you tell me the Error please??
|
|
|
|
|
System.Configuration.AppSettingsSection is not define
|
|
|
|
|
Please post your code...
The error is not relevent to find the fact.
|
|
|
|
|
whenever web.config file changed the application starts again..
so first u have to find a way to change the web.config file without restarting the application
|
|
|
|
|
Hi ASP.net Lovers
Well budys if .Net Framework 3.0 is released then whats new specific for ASP.net??? Thanks for your time...
|
|
|
|
|
.NET 3.0 right now is the new name for WPF. What's new for the web is WPF/E, but it's not really part of ASP.NET.
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 )
|
|
|
|