<
telerik:RadSplitter id="RadSplitter1" runat="server" skin="Office2007"
height="500px" width="950px" BorderSize="0" BorderStyle="None" >
<
telerik:RadPane id="LeftPane" runat="server" width="150px" Scrolling="None" Collapsed="false" BackColor="White">
<telerik:RadPanelbar ID="BarraCli" runat="server" skin="Vista" ExpandMode="FullExpandedItem" Height="500px"
Width="100%" CssClass="BarraCli">
<Items>
<telerik:RadPanelItem runat="server" Text="xxxxx" PostBack="false" Expanded="false" Value="0">
.... more code here
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelbar>
</
telerik:RadPane>
<
telerik:RadPane id="MiddlePane" runat="server" >
<div id="Div1" style="height: 20px"></div>
<asp:Panel ID="Panel1" runat="server" CssClass="Titulos" SkinID="Ptitulo" Width="600px" >
.... more things here
</asp:Panel>
<telerik:RadGrid ID="Grilla" Skinid="Grilla2" runat="server" OnNeedDataSource="........" DataKeyNames="...."
Width="600px" Height="400px" PageSize = "12" >
<MasterTableView NoMasterRecordsText=".." >
<Columns>
.......
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPane>
</
telerik:RadSplitter>
........
....
function
ValidateTreatment() {
var radcboLocType = document.getElementById("<%=radcboLocType.ClientID%>");
var radtxtName1 = document.getElementById("<%=radtxtName.ClientID%>");
var radtxtTreatmentLocAddr1 = document.getElementById("<%=radtxtTreatmentLocAddr1.ClientID%>");
var radcboTreatmentLocState = document.getElementById("<%=radcboTreatmentLocState.ClientID%>");
var radtxtTreatmentLocCity = document.getElementById("<%=radtxtTreatmentLocCity.ClientID%>");
var radmsktxtTreatmentLocZipCode = document.getElementById("<%=radmsktxtTreatmentLocZipCode.ClientID%>");
var radmsktxtTreatmentLocPhoneNum = document.getElementById("<%=radmsktxtTreatmentLocPhoneNum.ClientID%>");
var TreatmentEmailAddrs = $find("<%= raktxtTreatmentLocEmailAddress.ClientID %>");
var regEmailValidation = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/
if (radcboLocType.value.trim() == "") {
var oAlert = radalert("Location Type cannot be blank.");
oAlert.add_close(
function () { radcboLocType.focus() });
return false;
}
if (radtxtName1.value.trim() == "") {
var oAlert1 = radalert("Location Name cannot be blank.");
oAlert1.add_close(
function () { radtxtName1.focus() });
return false;
}
if (radtxtTreatmentLocAddr1.value.trim() == "") {
var oAlert2 = radalert("Mailing Address cannot be blank.");
oAlert2.add_close(
function () { radtxtTreatmentLocAddr1.focus() });
return false;
}
if (radtxtTreatmentLocCity.value.trim() == "") {
var oAlert3 = radalert("Mailing City cannot be blank.");
oAlert3.add_close(
function () { radtxtTreatmentLocCity.focus() });
return false;
}
if (radcboTreatmentLocState.value.trim() == "") {
var oAlert4 = radalert("Mailing State cannot be blank.");
oAlert4.add_close(
function () { radcboTreatmentLocState.focus() });
return false;
}
if (radmsktxtTreatmentLocZipCode.value.trim() == "") {
var oAlert5 = radalert("Mailing Zip Code cannot be blank.");
oAlert5.add_close(
function () { radmsktxtTreatmentLocZipCode.focus() });
return false;
}
if (radmsktxtTreatmentLocPhoneNum.value.trim() == "") {
var oAlert6 = radalert("Phone Number cannot be blank.");
oAlert6.add_close(
function () { radmsktxtTreatmentLocPhoneNum.focus() });
return false;
}
}
I used this fucntion on client of the save button.. but after the radalert i can't get the focus to the control. Please Help me asap.. Thank you in advance..
Can someone advise how to programmatically create a radwindow and it needed elements?
And then add it to the page.
Kyle
| GridGroupByExpression CountryCategoryExpression = GridGroupByExpression.Parse(" CName [ ],pName[ ProductValues/ServiceValues],sName[/] Group By CName"); |
| CountryRadGrid.MasterTableView.GroupByExpressions.Add(CountryCategoryExpression); |
| If e.CommandName = "CopyToInsertForm" Then |
| Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) |
| 'Put the RadGrid in the insert mode |
| RadGrid1.MasterTableView.IsItemInserted = True |
| RadGrid1.Rebind() |
| 'Get the inserformItem using the GetInsertItem Method |
| Dim insertedItem As GridEditFormInsertItem = DirectCast(RadGrid1.MasterTableView.GetInsertItem(), GridEditFormInsertItem) |
| 'Finding the textbox in the insert form and setting it's value |
| TryCast(insertedItem("NCR").Controls(0), RadTextBox).Text = item("NCR").Text |
| TryCast(insertedItem("PartNumber").Controls(0), RadTextBox).Text = item("PartNumber").Text |
| TryCast(insertedItem("Title").Controls(0), RadTextBox).Text = item("Title").Text |
| TryCast(insertedItem("Disposition").Controls(0), RadTextBox).Text = item("Disposition").Text |
| TryCast(insertedItem("Status").Controls(0), RadTextBox).Text = item("Status").Text |
| TryCast(insertedItem("maj").Controls(0), CheckBox).Checked = item("maj").Text |
| TryCast(insertedItem("min").Controls(0), CheckBox).Checked = item("min").Text |
| TryCast(insertedItem("corractionreqyes").Controls(0), CheckBox).Checked = item("corractionreqyes").Text |
| TryCast(insertedItem("corractionreqno").Controls(0), CheckBox).Checked = item("corractionreqno").Text |
| End If |
| If e.CommandName = RadGrid.InitInsertCommandName Then |
| e.Canceled = True |
| 'Prepare an IDictionary with the predefined values |
| Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary() |
| 'set initial checked state for the checkbox on init insert |
| newValues("maj") = True |
| newValues("min") = False |
| newValues("corractionreqyes") = False |
| newValues("corractionreqno") = True |
| newValues("Liason") = User.Identity.Name + Space(5) + DateTime.Today |
| 'Insert the item and rebind |
| e.Item.OwnerTableView.InsertItem(newValues) |
| End If |