Philip : Here is my code.
ASPX Codde:
** This is the link where I pop up the panel on the click event of
the link. *******
<a href="#" id="lnkClusterSettings"
onclick="GetCustomClusterSettingsScript();">Custom Cluster
Settings</a>
*** HTML Code for the Panel ***********
<div id="divCustomClusterSettings">
<table>
<tr><td>
<div id="divClusterSettingDataTable"></div>
</tr></td>
<tr><td>
<span class="metaheader">School CoordinatorSettings:</span><br />
<input type="radio" id="rbtLockClusterSettings" runat="server"
name="ClusterLockSettings"/> Lock Settings
<input type="radio" id="rbtUnLockClusterSettings" runat="server"
name="ClusterLockSettings"/> Unlock Settings
</tr></td>
</table>
</div>
JavaScript Code:
function PanelClusterSettingsFunction() {
$CLI.PanelClusterSettings = new YAHOO.widget.Panel
("divCustomClusterSettings",
{
fixedcenter: false,
visible: false,
constraoviewport: true,
zIndex:600,
xy: [150, 100],
width: "630px",
height: "250px",
close: true,
modal:true
});
$CLI.PanelClusterSettings.render();
YAHOO.util.Event.addListener("lnkClusterSettings", "click",
$CLI.PanelClusterSettings.show, $CLI.PanelClusterSettings, true);
}
YAHOO.util.Event.onDOMReady(PanelClusterSettingsFunction);
*** This is the function I am executing to define the DataTable ***
function LoadCourseData()
{
YAHOO.util.Event.throwErrors = true;
var Dom = YAHOO.util.Dom;
var Ex = YAHOO.example;
//---Define Column Definitions For A DataTable------
YAHOO.example.ClientPagination = new function() {
var myColumnDefs =
[
{ key: "Select", label: "Select", formatter:"checkbox",
width:50},
{ key: "School", sortable: true, label: "School",
width:250 },
{ key: "City", sortable: true, label: "City",
width:150 },
{key: "State", sortable: true, label: "State"}
];
//---Define DataSource For A DataTable------
Ex.myDataSource = new YAHOO.util.DataSource
($CLI.CustomClusterSettings.data);
Ex.myDataSource.responseType =
YAHOO.util.DataSource.TYPE_JSON;
Ex.myDataSource.responseSchema = {
resultsList: "items",
fields: [
{ key: "SchoolID" },
{ key: "School" },
{ key: "City" },
{ key: "State" }
]
};
//---Instatiate a DataTable------
Ex.myDataTable = new YAHOO.widget.DataTable
('divCustomClusterSettings', myColumnDefs,
Ex.myDataSource);
};
};
*** This is the function I am calling on the click of the
Link "lnkClusterSettings" ****
function GetCustomClusterSettingsScript()
{
var schoolId = 1015;
var ClusterId = 1048;
PageMethods.GetCustomClusterSettingsInfo
(schoolId,ClusterId,SuccessGetCustomClusterSettingsScript);
}
function SuccessGetCustomClusterSettingsScript(result)
{
var d=YAHOO.lang.JSON.parse(result);
$CLI.CustomClusterSettings = d;
LoadCourseData();
}
Satyam : Here I have put my code. Can you correct me if I am doing
any mistake with <div> tag you talked about in your reply?
--- In ydn-javascript@yahoogroups.com, Philip Tellis <philip@...>
wrote:
>
> k dropped bits saying:
>
> > I have created a panel having some HTMl controls like radio
buttons,
> > textboxes and a DataTable. But the problem is that as soon as the
> > panel pops up, it shows HTML controls for a second and then it
shows
> > the DataTable and all other HTML controls get disappeared.
> >
> > So I dont know if it is possible to create a DataTable inside a
Panel.
> > I have heard that you can create a Calendar control inside a
Panel but
> > for that you have to do some trick.
>
> show us the code
>