|
|
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
|
|
|
|
|
hi guys
I have some problem in inserting non english values in AJAX method (in AJAX i send information on get method)
my DB column type is : "ntext" (to allow non english)
i checked , i get right data on server , but wrong data would inputed to the DB !!!
some code is like that :
string res = Request["amount"].ToString() + "," + Request["price"].ToString() + "," + Request["year"].ToString() + "," + Request["month"].ToString() + "," + Request["day"].ToString() + "," + Session["code"].ToString() + "," + Request["kind"].ToString() + "," + "1" + ",'" + Request["comment"].ToString()+ "'";
string str = "INSERT INTO invest (amount,totalprice,year,month,day,personID,typeID,canedit,cms)VALUES(" + res + ")";
SqlDataSource1.InsertCommand = str;
SqlDataSource1.Insert();
Response.Write("اطلاعات وارد شد");
Response.End();
|
|
|
|
|
check if the datatype of the column nvarchar?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
it is ntext , i changed it to nvarchar(MAX) to see if gets better , but didn`t came true !!
|
|
|
|
|
is it possible to add scrollbar to a datagridview???
|
|
|
|
|
Place gridview inside a panel or div and give scroll to that container.
|
|
|
|
|
i placed the gridview inside the panel and set overflow: auto in panel style.But the scroll bar is coming for the whole page as such
|
|
|
|
|
Gave Width & Height for Panel?
|
|
|
|
|
Try setting Width and Height for Panel if not set.
|
|
|
|
|
No..it is coming now...thanks arun
|
|
|
|
|
myinstincts wrote: No..it is coming now...thanks arun
great.welcome.
|
|
|
|
|
by using div or panel you can acheive that...
Panel:
<asp:Panel id="divGrid" ScrollBars = Vertical runat=server style="OVERFLOW-Y: auto; overflow-x:hidden; HEIGHT:200PX; width:80%">
Div:
<div id="divGrid" runat="server" nowrap="nowrap" style="OVERFLOW-Y: auto; overflow-x:hidden; HEIGHT:170PX; width:80%">
|
|
|
|
|
i am getting it by setting overflow :auto style in panel...but what is that overflow-x and overflow-y in your code?is it for setting scrollbar to x and y axis?
|
|
|
|