| protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e) |
| { |
| if (!IFrame1Loaded) |
| { |
| path = "TabPages/Page1.aspx?"; |
| Iframe1.Attributes.Add("src", path); |
| IFrame1Loaded = true; |
| } |
| Iframe1.Visible = true; |
| } |
| <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Visible="true" BorderStyle="Solid" BorderColor="black" |
| BorderWidth="0px" Skin="Outlook" SelectedIndex="0" AutoPostBack="true" OnTabClick="RadTabStrip1_TabClick"> |
| <Tabs> |
| <telerik:RadTab Text="Page1" ID="tab0" runat="server"></telerik:RadTab> |
| <telerik:RadTab Text="Page2" ID="tab1" runat="server"></telerik:RadTab> |
| <telerik:RadTab Text="Page3" ID="tab2" runat="server"></telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <iframe id="Iframe1" src="" runat="server" width="98%" height="98%" frameborder="1" visible="false" ></iframe> |
| <iframe id="Iframe2" src="" runat="server" width="98%" height="98%" frameborder="1" visible="false" ></iframe> |
| <iframe id="Iframe3" src="" runat="server" width="98%" height="540px" frameborder="1" visible="false" ></iframe> |
| RadSpell spell = new RadSpell(); |
| spell.ButtonType = Telerik.Web.UI.ButtonType.PushButton; |
| spell.ControlToCheck = tb1.ID; |
| spell.DictionaryLanguage = "fr-fr"; |
| spell.SupportedLanguages = new string[] { "en-us, English, de-de, German, fr-fr, French" }; |
| spell.DictionaryPath = @"~/App_Data/RadSpell"; |
| RadSpell spell = (Page.Form.FindControl("clientSpell") as RadSpell); |
| spell.ButtonType = Telerik.Web.UI.ButtonType.PushButton; |
| spell.ControlToCheck = tb1.ID; |
| spell.DictionaryLanguage = "de-DE"; |
| //spell.SupportedLanguages = new string[] { "en-us, English, de-de, German, fr-fr, French" }; |
| //spell.DictionaryPath = @"~/App_Data/RadSpell"; |
| this.form1.Controls.Add(spell); |
| Dim dt as DataTable = GetDTFromDataBase | |
| grid.Datasource= dt | |
| grid.databind | |
| If dt.rows.count =0 Then | |
| grid.editItems.findcontrol("1").text = Now() | |
| Else | |
| grid.editItems.findcontrol("1").text = dt.rows(0)("date") | |
| End If |
| <telerik:RadGrid ID="rgActions" runat="server" AutoGenerateColumns="False" GridLines="None" | |
| AllowAutomaticInserts="false" Skin="WebBlue"> | |
| <MasterTableView> | |
| <RowIndicatorColumn> | |
| <HeaderStyle Width="20px" /> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn> | |
| <HeaderStyle Width="20px" /> | |
| </ExpandCollapseColumn> | |
| <EditFormSettings EditFormType="Template" > | |
| <FormTemplate> | |
| <%--<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="addAction" />--%> | |
| <table> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblDate" runat="server" Text="Date:"></asp:Label></td> | |
| <td> | |
| <%--<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>onclick="ToggleFirstPopup()"--%> | |
| <telerik:RadDatePicker ID="rdpDate" runat="server" Culture="English (Australia)" Skin="WebBlue"> | |
| <DateInput LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue" > | |
| </DateInput> | |
| <Calendar Skin="WebBlue" > | |
| </Calendar> | |
| </telerik:RadDatePicker> | |
| <asp:RequiredFieldValidator ID="rfvDate" runat="server" ControlToValidate="rdpDate" | |
| ErrorMessage="Date is required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td> | |
| <td> | |
| <asp:Label ID="lblAction" runat="server" Text="Action:"></asp:Label></td> | |
| <td> | |
| <asp:TextBox ID="txtAction" runat="server"></asp:TextBox> | |
| <asp:RequiredFieldValidator ID="rfvAction" runat="server" ControlToValidate="txtAction" | |
| ErrorMessage="Action required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblDateActioned" runat="server" Text="Date Actioned:"></asp:Label></td> | |
| <td> | |
| <%--<asp:TextBox ID="txtDateActioned" runat="server"></asp:TextBox>onclick="ToggleSecondPopup()"--%> | |
| <telerik:RadDatePicker ID="rdpDateActioned" runat="server" Skin="WebBlue"> | |
| <DateInput LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue" > | |
| </DateInput> | |
| <Calendar Skin="WebBlue"> | |
| </Calendar> | |
| </telerik:RadDatePicker> | |
| </td> | |
| <td> | |
| <asp:Label ID="lblActionBy" runat="server" Text="Action By:"></asp:Label></td> | |
| <td> | |
| <%--<asp:TextBox ID="txtActionBy" runat="server"></asp:TextBox>--%> | |
| <telerik:RadComboBox ID="rcbActionBy" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| </telerik:RadComboBox> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td colspan="4"> | |
| <asp:TextBox ID="txtComment" runat="server" Width="399px"></asp:TextBox></td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblNextAction" runat="server" Text="Next Action:"></asp:Label> | |
| </td> | |
| <td> | |
| <asp:TextBox ID="txtNextAction" runat="server"></asp:TextBox> | |
| <asp:RequiredFieldValidator ID="rfvNextAction" runat="server" ControlToValidate="txtNextAction" | |
| ErrorMessage="Next Action required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td> | |
| <td> | |
| </td> | |
| <td> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblNextToAction" runat="server" Text="Next To Action:"></asp:Label> | |
| </td> | |
| <td> | |
| <%--<asp:TextBox ID="txtNextToAction" runat="server"></asp:TextBox>--%> | |
| <telerik:RadComboBox ID="rcbNextToAction" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| <Items> | |
| <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> | |
| </Items> | |
| </telerik:RadComboBox> | |
| <asp:RequiredFieldValidator ID="rfvNextToAction" runat="server" ControlToValidate="rcbNextToAction" | |
| ErrorMessage="Next To Action is required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td> | |
| <td> | |
| </td> | |
| <td> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblCC" runat="server" Text="CC:"></asp:Label></td> | |
| <td colspan="3"> | |
| <telerik:RadComboBox ID="rcbCC1" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| <Items> | |
| <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> | |
| </Items> | |
| </telerik:RadComboBox> | |
| <telerik:RadComboBox ID="rcbCC2" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| <Items> | |
| <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> | |
| </Items> | |
| </telerik:RadComboBox> | |
| <telerik:RadComboBox ID="rcbCC3" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| <Items> | |
| <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> | |
| </Items> | |
| </telerik:RadComboBox> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| </td> | |
| <td colspan="3"> | |
| <asp:TextBox ID="txtCC" Rows="3" Width="200px" TextMode="multiLine" runat="server"></asp:TextBox> | |
| </td> | |
| </tr> | |
| </table> | |
| <asp:Button ID="btnAdd" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Add Action", "Update") %>' | |
| runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' ValidationGroup="addAction" /> | |
| </FormTemplate> | |
| </EditFormSettings> | |
| <Columns> | |
| <telerik:GridTemplateColumn UniqueName="TemplateColumn"> | |
| <ItemTemplate> | |
| <table> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblDate" runat="server" Text="Date:"></asp:Label></td> | |
| <td> | |
| <asp:Label ID="txtDate" runat="server" Text='<%# Bind("dateLog") %>'></asp:Label></td> | |
| <td> | |
| <asp:Label ID="lblAction" runat="server" Text="Action:"></asp:Label></td> | |
| <td> | |
| <asp:Label ID="txtAction" runat="server" Text='<%# Bind("action") %>'></asp:Label></td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblDateActioned" runat="server" Text="Date Actioned:"></asp:Label></td> | |
| <td> | |
| <asp:Label ID="txtDateActioned" runat="server" Text='<%# Bind("dateActioned") %>'></asp:Label></td> | |
| <td> | |
| <asp:Label ID="lblActionBy" runat="server" Text="Action By:"></asp:Label></td> | |
| <td> | |
| <asp:Label ID="txtActionBy" runat="server" Text='<%# Bind("ActionBy") %>'></asp:Label></td> | |
| </tr> | |
| <tr> | |
| <td colspan="4"> | |
| <asp:Label ID="txtComment" runat="server" Width="399px" Text='<%# Bind("comment") %>'></asp:Label></td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblNextAction" runat="server" Text="Next Action:"></asp:Label> | |
| </td> | |
| <td> | |
| <asp:Label ID="txtNextAction" runat="server" Text='<%# Bind("nextAction") %>'></asp:Label> | |
| </td> | |
| <td> | |
| </td> | |
| <td> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblNextToAction" runat="server" Text="Next To Action:"></asp:Label> | |
| </td> | |
| <td> | |
| <asp:Label ID="txtNextToAction" runat="server" Text='<%# Bind("nextToAction") %>'></asp:Label> | |
| </td> | |
| <td> | |
| </td> | |
| <td> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <asp:Label ID="lblCC" runat="server" Text="CC:"></asp:Label></td> | |
| <td> | |
| <asp:Label ID="txtCC" runat="server" Text='<%# Bind("cc") %>'></asp:Label></td> | |
| <td> | |
| </td> | |
| <td> | |
| </td> | |
| </tr> | |
| </table> | |
| </ItemTemplate> | |
| </telerik:GridTemplateColumn> | |
| </Columns> | |
| </MasterTableView> | |
| <ClientSettings> | |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> | |
| </ClientSettings> | |
| <FilterMenu EnableTheming="True" Skin="WebBlue"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| </FilterMenu> | |
| </telerik:RadGrid> |
I’m using <ClientSettings EnablePostBackOnRowClick="True"> to do Codebehind stuff when the user click on a row in a RadGrid.
The first column in the RadGrid is a <GridTemplateColumn> that I have a checkbox in:
<radG:GridTemplateColumn Groupable="False" Reorderable="False" UniqueName="SelectColumn" AutoPostBackOnFilter="false" >
<HeaderTemplate>
<asp:CheckBox ID="chkCheckAll" runat="server" ToolTip="!Select/deselect all" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkSelected" AutoPostBack="true" runat="server" OnCheckedChanged="chkSelected_CheckedChanged" />
</ItemTemplate>
<HeaderStyle Width="25px" />
<ItemStyle HorizontalAlign="Center" />
</radG:GridTemplateColumn>
My problem is that I don’t want a postback when the checkbox column is checked. I also want the row to me selected when checking the checkbox.
Hello,
I have a combobox that takes input for the RadUpload. The combo box loads with -- Select Value-- in it but when no selectin is made i get a NullReferenceException occurred. at this line.
string DBCreativeName = RCBXCreative.SelectedItem.Value;
so I tried to use an if and try catch to fix this
string DBCreativeName = RCBXCreative.SelectedItem.Value;
try
{
if (Convert.ToBoolean(DBCreativeName = ""))
{
lblstatupload2.Text = "You need to select a creative";
}
}
catch (NullReferenceException)
{
lblstatupload2.Text = " you need to enter a creative";
}
this didn't work either. Can someone advise me on what is the correct way to fix this.
Thanks,
Yusef
<
telerik:RadComboBox ID="ddlProductCategory" runat="server" Height="140px" Width="215px" DropDownWidth="450px"
ShowToggleImage="True" Skin="MinExpo" EnableEmbeddedSkins="false" Style="vertical-align: middle;">
<ItemTemplate>
<div id="div1">
<telerik:RadTreeView runat="server" ID="radCheck" OnLoad="PopPCNodes_Load" OnClientNodeClicking="nodeClicking"
Skin="WebBlue">
</telerik:RadTreeView>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem Text="All Product Categories" Value="0" />
</Items>
</telerik:RadComboBox>

// Finds all the checkboxes in the context menu.
$(
function() {
$(
":checkbox").filter(function() {
return this.id.match('rghcMenu')
}).click(
function() { OnContextMenuClick(this) });
}
);
var
columnHash;
// Triggered when the columns slide open.
function
OnHeaderContextMenuClientItemOpened() {
for (var key in columnHash) {
var control = document.getElementById(key);
control.checked = columnHash[key];
}
}
// Maintains the state of the checkbox.
function
OnContextMenuClick(checkBox) {
if (columnHash == null) {
columnHash =
new Object();
}
columnHash[checkBox.id] = checkBox.checked;
}
and then have this in the HeaderContextMenu on the grid:
<
HeaderContextMenu OnClientItemOpened="OnHeaderContextMenuClientItemOpened" />
I hope that this helps people. I found it frustrating to figure out how to do it. We put ours in our skins for all themes and put the javascript and JQuery above in an embedded resource file which we load up on any page with a Rad Grid.
Mike Moser