|
i've set the property of edit in data gridview control..but why it is not working???The fields in my data gridview are databound....Any particular property i am missing?????????
|
|
|
|
|
How it is possible to find what you have missed without your coding
|
|
|
|
|
I dnt knw what code is to be written inside the row editing event...i had read in sme other article that just enabling the row_editing event will be sufficient....
Here my datasource is datatable..and the gridview rows are databound..is it needed to convert those rows to some controls like textbox to enable edit property?
|
|
|
|
|
For that Edit Property To Work .U need to use data source i.e. sqldatasource ,then it will work .Otherwise if u r binding data source programmatically then u need to use code and templates to databind u can the following link to do programmatically
GridView all in one[^]
|
|
|
|
|
There is a external css file with some classes and elements provided. I link it in the master page head section as from MSDN web sites templates:
<link href="themes/default/styles.css" rel="stylesheet" type="text/css" />
After I set in some button controls CssStyle to some of the css classes, in VS design view the style is changed but when the page is run, they are displayed without any styles applied.
How to link that stylesheet properly? or what is the problem
Чесноков
modified on Friday, August 28, 2009 8:42 AM
|
|
|
|
|
Style sheet design cant be seen in your design page . It will be applied only when the page gets executed. I don't know how to have seen the design of style sheet in your design view. Nothing wrong in your registration with the master page. Post more codes to get clarification.
|
|
|
|
|
In VS2008 there is addition of design view of your web page as it looks from the source, along with split, where you can watch both source code and the page look.
"Project.Master file"
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GenderAge.master.cs" Inherits="GenderAge.GenderAge" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<link href="themes/default/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
"Page.aspx file"
<%@ Page Title="" Language="C#" MasterPageFile="~/Project.Master" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="Page.Main" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Button ID="buttonFileUpload" runat="server"
Text="Upload" CssClass="buttons" />
</asp:Content>
Чесноков
|
|
|
|
|
What does the output HTML look like?
What are you putting in the head place holder? Is the / missing from the end of <asp:content id="Content1" contentplaceholderid="head" runat="server"> due to a cut and paste issue or is it missing from your page as well?
|
|
|
|
|
yes, it misses in the paste operation here.
I do not put anything in the head place holder Content1. Should I?
After I created the App_Themes folder and put there css file the styles become visible after the page is started.
However there is difference between VS2008 design view and the actual page, e.g. marging and padding does not work in some div controls???
Чесноков
|
|
|
|
|
hi all,
i have html table with some data.......now i want collect the data from this html table and then send the all data to the server-side through page method.
My logic is that in for-loop collect all data from html table and put in hashtable and then add this hashtable in an arraylist and then send this arraylist to server side.
Can anybody solve my problem?
|
|
|
|
|
Hello every one i want to upload an image by file uploader and want to store path of the image in database .please guide me.how can i do this
|
|
|
|
|
Did you tried FileUpload control??
It will help you upload the file and then also give you its path, you can then save the path in database.
|
|
|
|
|
|
Hello All,
i have facing one problem
i have one check box like below
<asp:checkbox id="uxonechk" runat="server" enabled="false">
Now i want to Enabled = true in javascript not server side then how it possible i have try through below code but not woking please let me know how it possible.
like,
funcction enableAll()
{
var Checkbox = document.getElementById('<%=uxonechk.ClientID %>');
ConformOwnershipDropdown.disabled = false;
}
this above function i have call on dropdown "onChange" event
Please let me know how it possible to Enabled = true using Javascript
Thank you in advance,
Anish Patel
|
|
|
|
|
You need to enable checkbox.right?
try this in javascript,
Findout CheckBox as chk by getElementById and then,
chk.disabled = false;
chk.parentNode.disabled = false;
Let me know if any pblm is there.
|
|
|
|
|
Thanks, it's working
Anish Patel
|
|
|
|
|
<script language="javascript" type="text/javascript">
function ChkEnabled(){
var a = document.getElementById('<%=CheckBox1.ClientID %>');
a.disabled = false;
if(a.parentElement.tagName == 'SPAN' && a.parentElement.disabled == true)
a.parentElement.disabled = false;
}
</script>
HTH
|
|
|
|
|
Hi,
I am trying to add dynamic link button to data table. But get an full link class name.i.e.
System.Web.UI.WebControls.LinkButton
can any one tell me the way to do this?
Here is my code:
Dim dt As New DataTable()
Dim dr As DataRow
dt.Columns.Add("EventDate", Type.[GetType]("System.DateTime"))
dt.Columns.Add("EventHeader", Type.[GetType]("System.String"))
Dim lnk As New LinkButton
lnk.ID = InteractionClickId
lnk.Text = objDal.Name
dr = dt.NewRow()
dr("EventDate") = objDal.Date1
dr("EventHeader") = lnk
dt.Rows.Add(dr)
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
I haven't tried but don't this is possible.
What you want to achieve?
And we normally add controls to the page.
|
|
|
|
|
I m trying to use a modal popup extender, dynamically in my code in event calendar.
And event calendar is a 3rd party tool, I only have dll for that.
So I have to paas all data in data table to add in event calendar.
That's why I m trying to do this.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
That event calendar control should have some databinding event?
You can handle that event and then use it to add controls to it.
HTH
|
|
|
|
|
Hi
I am having a GridView paging done using Object data source.
I want to calculate the sum of records of a column.
First I need to find out values if ID = 1 sum all IDS with 1, if ID=2 sum all IDS with 2 and Display. I am able to do it
but when i move to next page my label looses its value while rendering.
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
Hi
I got teh solution for the problem. I am usin Update Panel which gives inconsistent behaviour while postback.
SO before closing Update Panel for gridView we need to give
this PostBack Trigger
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID ="gvInstitutionReport" />
</Triggers>
</asp:UpdatePanel>
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
Hi. I'm rather new to asp.net and even more so in crystal. Basically this is the first time I'm using this. What I need to do is prepare a report from a dynamically created dataset(untyped if you will). I have read a lot of articles online but haven't been able to make it work.
Basically the table that i want to display in crystal doesn't exist in database and was created programmatically as a DataTable
The data simply doesn't display.Here's the code in codebehind:
Protected Sub CrystalReportViewer1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Init
Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("CrystalReport1.rpt")
rpt.SetDataSource(dset.Tables("Tab1"))
CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.DataBind()
End Sub
Please note that the dataset is populated correctly as i can see it in a gridview. CrystalReport1.rpt uses the same schema as Tab1 but using a dataset included at design time called "DataSet1".
Here is the code for how this dataset was created:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
Dim mysqlDad As MySqlDataAdapter
Dim mysqlConn As MySqlConnection
Dim query As String = "" 'some select query that returns 2 rows.
Dim connstring As String = "Database=ocsweb;Data Source=10.135.158.160;User Id=abc;Password=abc"
dset = New DataSet("Home")
dset.ReadXmlSchema(Server.MapPath("~\App_Code\DataSet1.xsd"))
mysqlConn = New MySqlConnection(connstring)
mysqlDad = New MySqlDataAdapter(query, mysqlConn)
mysqlDad.Fill(dset, "Tab1_tmp")
Dim Dt As New DataTable("Tab1")
Dim col1 As New DataColumn("Unchecked")
Dim col2 As New DataColumn("Checked")
Dt.Columns.Add(col1)
Dt.Columns.Add(col2)
Dim dr As DataRow = Dt.NewRow()
dr.Item(0) = dset.Tables("Tab1_tmp").Rows(0).Item(0)
dr.Item(1) = dset.Tables("Tab1_tmp").Rows(1).Item(0)
Dt.Rows.Add(dr)
dset.Tables.Add(Dt)
catch ex as exception
msgbox(ex.message)
end try
If there is something else that can/needs to be done, please let me know. I'm very new and could surely use some help here.
modified on Friday, August 28, 2009 6:18 AM
|
|
|
|
|
Try with button click event instead of pageload to bind the dataset to report and see
|
|
|
|