|
Debug that event.Is that fire or not?
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
I debug it but the event dose not get fired.
Rahul
|
|
|
|
|
May be possible that you are binding Datalist on Every postback.
Check out
<br />
if(!Ispostback)<br />
{<br />
}
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi
Thanks for u r reply i solved that.
Rahul
|
|
|
|
|
Hi All,
How to disable all controls of the aspx page, when some condition occus?
I have done this thing manually. Like taking each and every control of page and setting it's propery as true.
<br />
if(status>=1)<br />
{<br />
txt_apply_for.Enabled = false;<br />
input_type_repayment.Enabled = false;<br />
input_loan_package.Enabled = false;<br />
input_first_home_buyer.Enabled = false;<br />
input_company_application.Enabled = false;<br />
input_interest_rate.Enabled = false;<br />
}<br />
else<br />
{<br />
txt_apply_for.Enabled = true;<br />
input_type_repayment.Enabled = true;<br />
input_loan_package.Enabled = true;<br />
input_first_home_buyer.Enabled = true;<br />
input_company_application.Enabled = true;<br />
input_interest_rate.Enabled = true;<br />
}<br />
But it is very tough when controls are more. Is there any other way or solution for this? Thank You
Keep Smiling...........
|
|
|
|
|
Please follow up Christian Graus and JON post
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Thnak you very much Mr. Parwej Ahamad
Keep Smiling.......
|
|
|
|
|
Read my reply, his code won't really work. You need a recursive function, and you definately do not need to do all that ugly casting.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Wow.
You're on the right track, and yet so far from it. The base class, Control, has the enabled property. The casting you're doing is totally superfluous, and makes the code messy.
Also, don't use 'is' and then cast. Use 'as' and use the result.
finally, the method needs to be recursive for it to work across the page.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Something Like this...
Private Sub DisableControls(ByVal c As Control)
If TypeOf c Is WebControl Then
CType(c, WebControl).Enabled = False
End If
For Each child As Control In c.Controls
DisableControls(child)
Next
End Sub
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Thanks Christian Graus
i agree with you.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hello Mr. Christian Graus,
Thanks for kind help. Can u plz give me code for the recursive function?
Keep Smiling..........
|
|
|
|
|
Put all the controls inside a container control(panel) and pass the Container Control as a parameter to this function. This will Disable all the server controls that is inside the Container Control.
Private Sub DisableControls(ByVal c As Control, ByVal status As Boolean)
For Each child As Control In c.Controls
If TypeOf c Is WebControl Then
CType(c, WebControl).Enabled = status
End If
Next
End Sub
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
While I'm Creating an Object to a class using javascript in asp.net..Im getting this error..
Automation server can't create object
I' using this is my statement
var obj =new ActivexObject("Sample.clsSample")
|
|
|
|
|
What on earth is your problem ? You've asked this four times now, and you have got more than four answers. If you're incapable of understanding the answers, reply to the people who have answered you. What you're doing is plain rude. The answers will not change, no matter how often you ask.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi friend
soposed that i have tree node
root
parent1
child
parent2
child
i want if any body want to add child in child node then its not possible. or i want to restrict add any new node in child node how it's possible. please help me
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
Tell me one thing paren1 and parent2 are predefine node or it create dynamically
When you add any node then check parent node of the node: if it is Root node then allow to add other deny.
Like:
Root
parent1
child1
parent2
suppose if user want to add node in child1 then check parent node of the child1 that is parent1 not it Root. so it will deny it.
if user want to add node in parent1 then check parent node of parent1 is Root that is Root so it will be allow.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
create dynamically
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
When you add any node then check parent node of the node: if it is Root node then allow to add other deny.
Like:
Root
parent1
child1
parent2
suppose if user want to add node in child1 then check parent node of the child1 that is parent1 not it Root. so it will deny it.
if user want to add node in parent1 then check parent node of parent1 is Root that is Root so it will be allow.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
ok thanku i have done this
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
I want to create an Object to a class which is in DLL using..
objSamp = new ActiveXObject("Sample.clsSample");
I'm using this statement in Javascript in ASPX page...
but I'm getting error in aspx page
error is "Automation Server Can't create Object"
How can I resolve this error..?
Please Help me.....
|
|
|
|
|
Hi
This is beacuse of windows can't verify the activex object which you have, once you make your activex control a signed component, the IE will install your component automatically, and you can fix this. i have got Lpktool.exe from google, that you can use to convert your activex object a signed component...(you must have the source code with you..!)
regards
Sebastian
|
|
|
|
|
Hi All,
I am having a datatable which has data as parent child relation. The problem I am facing is explain below with the example.
Ex:
ChildID Description ParentID
A Desc1 NULL
B Desc2 A
C Desc3 A
D Desc4 A
It shows
A
B --| Hidden under Parent A
C |
D ---
B Again Child Element is shown.
C
D
And I want the display as:
A
B --| Hidden under Parent A
C |
D ---
Please help me with this.
Thanks....
|
|
|
|
|
Not sure exactly, but I would say a Repeater will solve your problem, because it gives you the most control over your generated HTML. Nested repeaters may be required, I'm not sure, you've not explained it well enough for me to follow fully.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanks for the reply. Actually I am using javascript to build this tree and for building I am doing the following as I haveget data from Database:
DataTable dtFinal = cf.Return_DataTable("EXECUTE getAllData 719, 1, 0, 0", connectionString);
In dtFinal I get the records as
ChildID Description ParentID
A Desc1 NULL
B Desc2 A
C Desc3 A
D Desc4 A
And I need to show this as treegrid. Before this it was working fine as I was firing 2 different queries and get Parent and Child datatable and then fire query on Child datatable.
Things were fine till that time now when I execute sp and get only 1 datatable this are not working.
Hope I have explained my self well.
Please help me how to do this...
Thanks again....
|
|
|
|