I made the changes in the ajax tool kit project. Some how Visual Studio knows to pull the newly complied dll because the tabs are showing up disabled instead of hidden. My problem is I am trying to manipulate the tabs through javascript on the client side.
I am getting java error on this statement:
This doesn't cause an error, but it doesn't change the tab to enable. I think the the style sheet is not changing for the tab panel. When I check the value after this statement it is indeed true.
I did a diff on the source code for 10606 and the previous version and i think i didnt see the changes applied in there. I havet checked 10618 source code however.
Why the insistence on the need to do this on the client side?
once the tab control is in an updatepanel, this enabling and disabling can be done on the server side seemlessly.
On the server side, you dont have to worry about which browser javascript DOM you are targetting, do you plan on / or do you test your solution on IE5/6/7 and Mozilla ?
Referring back to DanielFungs original post identifying the changes to be made to the source.
Is it the intention to add the code to the toolkit in an upcoming release given that this was effectively a bug.
I'm concerned at making changes to the toolkit myself as I'll have to remember to do it everytime a new release of the toolkit is made until the matter is fixed.
To enable the tab and move to it this javascript function works for me:
function changeTab(e)
{
//Usage: OnClientClick="changeTab(4);return false;"
//Get the Index of the destination Tab
var tabIndex = parseInt(e);
//Get a Handle to the Tab Behavior
var tabBehavior = $get('<%=tabsPatientDetailsPage.ClientID%>').control;
//Enable the tab
tabBehavior.get_tabs()[tabIndex].set_enabled(true);
//Set the Currently Visible Tab
tabBehavior.set_activeTabIndex(tabIndex);
}
Referring back to DanielFungs original post identifying the changes to be made to the source.
Is it the intention to add the code to the toolkit in an upcoming release given that this was effectively a bug.
I'm concerned at making changes to the toolkit myself as I'll have to remember to do it everytime a new release of the toolkit is made until the matter is fixed.
Yes, you will have to remember to update any new releases of the control toolkit that does not have these "fixes".
But hopefully you develop in an environment where you keep the different DLLs ( versions) of the libraries such as ajaxcontroltoolkit.dll.
In a controlled environment where you QA or review your product , if you accidentally use the "newer DLL" without the fixes you will soon find out thats its not working as expected.
So this way you will have the source code tree for the version you plan to fix and store that DLL somewhere globally accessible to your development box(es).
When the new release comes out you do the same thing to that new source code tree and now you have 2 AjaxcontrolToolKit DLLs. You decide which one you are going to add to a project.
ruffeo
Member
8 Points
6 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
May 24, 2007 02:02 PM|LINK
I made the changes in the ajax tool kit project. Some how Visual Studio knows to pull the newly complied dll because the tabs are showing up disabled instead of hidden. My problem is I am trying to manipulate the tabs through javascript on the client side. I am getting java error on this statement:
document.getElementById('ctl00_ContentPlaceHolder1_TabControl').get_tabs()[1].set_enabled(true);It is says "Object doesn't support property or method".
I also have tried to change the enable property through this line of code:
document.all(
"__tab_ctl00_ContentPlaceHolder1_TabControl_TabPanel1").Enabled = true;This doesn't cause an error, but it doesn't change the tab to enable. I think the the style sheet is not changing for the tab panel. When I check the value after this statement it is indeed true.
Can someone help me out with this.
zoetosis
Member
265 Points
119 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jun 12, 2007 03:49 PM|LINK
danielfung
Member
104 Points
33 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 01, 2007 12:08 AM|LINK
I did a diff on the source code for 10606 and the previous version and i think i didnt see the changes applied in there. I havet checked 10618 source code however.
FYI
danielfung
Member
104 Points
33 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 01, 2007 07:58 PM|LINK
Why the insistence on the need to do this on the client side?
once the tab control is in an updatepanel, this enabling and disabling can be done on the server side seemlessly.
On the server side, you dont have to worry about which browser javascript DOM you are targetting, do you plan on / or do you test your solution on IE5/6/7 and Mozilla ?
ruffeo
Member
8 Points
6 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 02, 2007 12:50 PM|LINK
When I do it on the server side, I lose all the controls inside the tab panel. Any suggestions.
danielfung
Member
104 Points
33 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 02, 2007 02:25 PM|LINK
How are you designing your tab control/updatepanel layout - in Visual Studio's WYSIWYG designer or programmatically?
Do provide a simpilfied version of your markup.
Nimua
Member
2 Points
12 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 11, 2007 11:35 AM|LINK
If someone is still interesting there is a simple way to disable tab (make it greyed)
document.getElementById("
+ TabModem.ClientID + ").disabled = trueThis works to disable the content of tab. And this for the header
document.getElementById('__tab_" + TabModem.ClientID + "').disabled = true
Unfortunatly I failed to find the ClientId for the header of tab
zoetosis
Member
265 Points
119 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 16, 2007 04:56 PM|LINK
Referring back to DanielFungs original post identifying the changes to be made to the source.
Is it the intention to add the code to the toolkit in an upcoming release given that this was effectively a bug.
I'm concerned at making changes to the toolkit myself as I'll have to remember to do it everytime a new release of the toolkit is made until the matter is fixed.
zoetosis
Member
265 Points
119 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 17, 2007 10:44 AM|LINK
ruffeo,
To enable the tab and move to it this javascript function works for me:
function changeTab(e) { //Usage: OnClientClick="changeTab(4);return false;" //Get the Index of the destination Tab var tabIndex = parseInt(e); //Get a Handle to the Tab Behavior var tabBehavior = $get('<%=tabsPatientDetailsPage.ClientID%>').control; //Enable the tab tabBehavior.get_tabs()[tabIndex].set_enabled(true); //Set the Currently Visible Tab tabBehavior.set_activeTabIndex(tabIndex); }danielfung
Member
104 Points
33 Posts
Re: How to set a Tab in a Tabcontainer to disabled (but visible)
Jul 17, 2007 02:53 PM|LINK
Yes, you will have to remember to update any new releases of the control toolkit that does not have these "fixes".
But hopefully you develop in an environment where you keep the different DLLs ( versions) of the libraries such as ajaxcontroltoolkit.dll.
In a controlled environment where you QA or review your product , if you accidentally use the "newer DLL" without the fixes you will soon find out thats its not working as expected.
So this way you will have the source code tree for the version you plan to fix and store that DLL somewhere globally accessible to your development box(es).
When the new release comes out you do the same thing to that new source code tree and now you have 2 AjaxcontrolToolKit DLLs. You decide which one you are going to add to a project.
No stress there.