| <ConfirmTemplate> |
| <div style="height:10px;"></div> |
| <div style="float:left; padding-right:20px;"> |
| <img src="../im/sw.png" alt="" title="" /> |
| </div> |
| <div class="windowpopup radconfirm"> |
| <div class="DFont"> {1} </div> |
| <div style="height:20px;"></div> |
| <div> |
| <div style="float:left; padding-right:18px;"></div> |
| <div style="float:left;width:100px;"> |
| <a class="DFont" onclick="$find('{0}').callBack(true);" href="javascript:void(0);" > |
| <div class="CButtons DFont" style="cursor:pointer; width:90px; text-align:center;"> |
| <div id="okBtn" class="DFont" style="width:90px; text-align:center;">Yes, Delete</div> |
| </div> |
| </a> |
| </div> |
| <div style="float:left;width:70px;"> |
| <a class="DFont" onclick="$find('{0}').callBack(false);" href="javascript:void(0);"> |
| <div class="CButtons DFont" style="cursor:pointer; width:60px; text-align:center;"> |
| <div class="DFont" style="width:60px; text-align:center;">Cancel</div> |
| </div> |
| </a> |
| </div> |
| <div style="clear:both;"></div> |
| </div> |
| </div> |
| <div style="height:10px;"></div> |
| </ConfirmTemplate> |
radG:RadGrid ID="dgRequest" runat="server" AllowSorting="True" AllowPaging="true"
EnableAJAX="False" AllowFilteringByColumn="True" ShowGroupPanel="True" ExportSettings-ExportOnlyData="true"
ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ShowFooter="false"
Skin="Monochrome" BorderStyle="None" MasterTableView-CellPadding="0" MasterTableView-AutoGenerateColumns="false"
Style="width: 100%;" CellPadding="0" EnableAJAXLoadingTemplate="False" Width="100%"
ClientSettings-ApplyStylesOnClient="true" PageSize="19">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" GroupLoadMode="Client"
EnableColumnsViewState="true" Style="width: 100%;" DataKeyNames="Request_ID">
<ExpandCollapseColumn Visible="False">
<HeaderStyle Width="19px" />
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<Columns>
<radG:GridBoundColumn Visible="False" DataField="Request_ID" HeaderText="RequestID">
</radG:GridBoundColumn>
<radG:GridButtonColumn Visible="false" HeaderText="select">
</radG:GridButtonColumn>
<radG:GridBoundColumn DataField="date_modified" DataType="System.DateTime" SortExpression="date_modified"
HeaderText="Date Created" AllowFiltering="true" ItemStyle-HorizontalAlign="Right">
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="vendor_co_name" SortExpression="vendor_co_name"
HeaderText="Vendor Company" AllowFiltering="true">
</radG:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings EnableClientKeyValues="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"
AllowGroupExpandCollapse="True" AllowDragToGroup="True">
<Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
<Selecting AllowRowSelect="true" />
<Scrolling AllowScroll="False" UseStaticHeaders="False" SaveScrollPosition="True"></Scrolling>
<ClientEvents OnRowDblClick="RowDblClick" OnRowSelected="RowSelected" />
</ClientSettings>
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
</radG:RadGrid>
And in the Code File
Dim
ds As DataSet
'function that bring the Data and fill the dataset
ds = Company.GetVendorRequests(Ds_Security.GetUserID, VendorCoName, vendorUserName, ReqClientCompany, reqStatus, quickSearch)
Me.dgRequest.DataSource = ds
ViewState("VendorUsers") = ds
And
Protected
Sub dgRequest_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles dgRequest.NeedDataSource
If IsPostBack Then
dgRequest.DataSource = ViewState("VendorUsers")
End If
End Sub
public
class SessionVariable_WP : System.Web.UI.WebControls.WebParts.WebPart
{
RadTextBox box;
Button alex;
protected RadAjaxPanel _mainUpdatePanel = null;
protected UserControl _loadingPanelControl = null;
protected const string _templateURL = @"/_layouts/1033/tdsb_aw/controltemplates/";
string input;
public SessionVariable_WP()
{
this.ExportMode = WebPartExportMode.All;
}
protected override void Render(HtmlTextWriter writer)
{
writer.Write(input);
RenderChildren(writer);
}
protected override void CreateChildControls()
{
try
{
Controls.Clear();
base.CreateChildControls();
box =
new RadTextBox();
box.Visible =
true;
box.ID =
"box";
box.Text = (
string)Page.Session["box"];
alex =
new Button();
alex.ID =
"button";
alex.Text =
"Click Me";
alex.Click +=
new EventHandler(alex_Click);
_mainUpdatePanel.Controls.Add(alex);
_mainUpdatePanel.Controls.Add(box);
ChildControlsCreated =
true;
}
catch (Exception ex)
{
string strMsg = "EX in CreateChildControls: " + ex.Message;
}
}
void alex_Click(object sender, EventArgs e)
{
Page.Session[
"box"] = box.Text;
input = box.Text;
input = (
string)Page.Session["box"];
}
protected override void OnInit(EventArgs e)
{
try
{
base.OnInit(e);
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
_mainUpdatePanel =
new RadAjaxPanel();
_mainUpdatePanel.ID =
"MainUpdatePanel";
_mainUpdatePanel.LoadingPanelID =
"MainLoadingPanel";
_mainUpdatePanel.EnableAJAX =
true;
if (scriptManager == null)
{
scriptManager =
new RadScriptManager();
scriptManager.ID =
"ScriptManager";
Controls.AddAt(0, scriptManager);
}
//Register the loadingpanel control
_loadingPanelControl = (
UserControl)this.Page.LoadControl(_templateURL + "Loading.ascx");
_loadingPanelControl.ID =
"MainLoadingPanelControl";
this.Controls.Add(_mainUpdatePanel);
this.Controls.Add(_loadingPanelControl);
if ((string)Page.Session["box"] != null)
{
input = (
string)Page.Session["box"];
}
EnsurePanelFix();
}
catch (Exception ex) { }
}
private void EnsurePanelFix()
{
try
{
ScriptManager.RegisterStartupScript(this, typeof(SessionVariable_WP), "UpdatePanelFixup", "_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true", true);
}
catch (Exception ex) { }
}
protected override void RenderChildren(HtmlTextWriter writer)
{
try
{
if (HasControls())
{
foreach (Control curControl in Controls)
{
curControl.RenderControl(writer);
}
}
}
catch (Exception ex)
{
}
}
}