If Not tblLastItem.Rows(i)("CntrGnlItm_Level") Then
dtbl.Columns.Add(tblLastItem.Rows(i)(
"CntrLstItm_ID_").ToString)
Dim templateColumnName As String = tblLastItem.Rows(i)("CntrLstItm_ID_")
Dim templateColumn As New GridTemplateColumn()
templateColumn.ItemTemplate =
New MyEditTemplate(templateColumnName)
templateColumn.EditItemTemplate =
New MyEditTemplate(templateColumnName)
templateColumn.HeaderText = tblLastItem.Rows(i)(
"CntrGnlItm_ParentTitr").ToString.Trim + "--" + tblLastItem.Rows(i)("CntrLstItm_Titr").ToString.Trim
templateColumn.UniqueName = tblLastItem.Rows(i)(
"CntrLstItm_ID_")
Me.grd.MasterTableView.Columns.Add(templateColumn)
Else
If Not Me.grd2.MasterTableView.Columns.Contains(tblLastItem.Rows(i)("CntrLstItm_ID_").ToString) Then
Me.grd2.MasterTableView.Columns.Add(col)
End If
dtbl2.Columns.Add(tblLastItem.Rows(i)(
"CntrLstItm_ID_").ToString)
End If
so,there is a RadNumericTextBox in MyEditTemplate .User enter value in RadNumericTextBox ,How i get value which user entered?
However, I want to put a combo box in the place of the field selector itself (the left hand side of the greater than / equal to)
I can successfully create the combo box, but then it appears in the wrong place (the right hand side). See the code that does this below.
So I tried putting it at position 0.. In InitializeEditor, instead of this line:
container.Controls.Add(_combo);
I had:
container.Controls.AddAt(0);
This puts it in the correct place, but then I cannot work out how to add the functionality that ensures that when the user clicks on
a particular entry, the text box appears to the right of the greater than/ equal to section?
I think I have to capture the onselected event from the combo box and then create the appropriate textbox control right?
PLEASE HELP!
RadFilterDropDownEditor dropDownFieldEditor = new RadFilterDropDownEditor(); RadFilter1.FieldEditors.Add(dropDownFieldEditor); DataTable dt = MakeTable();
//create the list of fields to select on
foreach (FilterFieldDTO dtoField in filterOptionList) { DataRow row; row = dt.NewRow(); row["FieldName"] = dtoField.FieldName; string strFieldName; if (row["FieldName"].ToString().LastIndexOf(".") > -1) { strFieldName = row["FieldName"].ToString().Substring(row["FieldName"].ToString().LastIndexOf(".") + 1); } else { strFieldName = row["FieldName"].ToString(); } row["FieldName"] = strFieldName; row["DataValueField"] = strFieldName; row["DataTextField"] = strFieldName; dt.Rows.Add(row); } dropDownFieldEditor.DataTextField = "DataTextField"; dropDownFieldEditor.DataValueField = "DataValueField"; dropDownFieldEditor.FieldName = "FieldName"; dropDownFieldEditor.DataSource = dt;<%@ Page Title="Projects" Language="C#" MasterPageFile="~/MasterPages/Default.master" AutoEventWireup="true" CodeBehind="Projects_New.aspx.cs" Inherits="TED.Web.Projects.Projects_New" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server"> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true"> <Windows> <telerik:RadWindow ID="UserListDialog" runat="server" Style="z-index: 100000;" ReloadOnShow="true" AutoSize="true" ShowContentDuringLoad="false" Modal="false" /> </Windows> </telerik:RadWindowManager> <asp:ValidationSummary ID="valSummary" runat="server" ValidationGroup="valSummary" ShowMessageBox="true" ShowSummary="false" DisplayMode="BulletList" /> <div> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> <asp:Table ID="Table1" class="commandbar" runat="server" CellPadding="0" CellSpacing="1" Width="100%"> <asp:TableRow CssClass="commandbutton"> <asp:TableCell Width="10%" HorizontalAlign="Left"> <asp:LinkButton ID="lnkSave" runat="server" SkinID="LinkButton_Save" CausesValidation="True" ValidationGroup="valSummary" OnClick="lnkSave_Click"></asp:LinkButton></asp:TableCell> <asp:TableCell Width="80%" HorizontalAlign="Center"> <asp:Label ID="Label1" runat="server" SkinID="Label_Bold_10pt">Add/Edit Projects</asp:Label> </asp:TableCell> <asp:TableCell Width="10%" HorizontalAlign="Right"> <asp:LinkButton ID="LinkButton1" runat="server" SkinID="LinkButton_Cancel" CausesValidation="False" OnClick="lnkCancel_Click"></asp:LinkButton></asp:TableCell> </asp:TableRow> </asp:Table> <div class="tableAccentFullBlue"> <br /> <div class="divLabel"> <asp:Label ID="lblProjectID" runat="server" SkinID="Label_Bold_8pt" Text="Project ID:" Width="110px"></asp:Label> <asp:Label ID="projectID" runat="server" SkinID="Label_Bold_8pt"></asp:Label> </div> <div class="divLabel"> <asp:Label ID="lblClientName" runat="server" SkinID="Label_Bold_8pt" Text="Client Name:" Width="110px"></asp:Label> <telerik:RadComboBox ID="ddlClientName" runat="server" Skin="Web20" AllowCustomText="false" MarkFirstMatch="true" Width="300px"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvClientName" runat="server" ControlToValidate="ddlClientName" ValidationGroup="valSummary" ErrorMessage="Client Name Required">*</asp:RequiredFieldValidator> </div> <div class="divLabel"> <asp:Button ID="btnNext" runat="server" Text="Next>>" OnClick="btnNext_Click" CausesValidation="true" ValidationGroup="valSummary" Visible="false" /> </div> <div id="divDetails" runat="server" visible="false"> <div class="divLabel"> <asp:Label ID="lblProjectType" runat="server" SkinID="Label_Bold_8pt" Text="Project Type:" Width="110px"></asp:Label> <telerik:RadComboBox ID="ddlProjectType" runat="server" Skin="Web20" AllowCustomText="false" MarkFirstMatch="true" Width="200px"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvProjectType" runat="server" ControlToValidate="ddlProjectType" ValidationGroup="valSummary" ErrorMessage="Project Type Required">*</asp:RequiredFieldValidator> </div> <div class="divLabel"> <asp:Label ID="lblRM" runat="server" SkinID="Label_Bold_8pt" Text="Project RM:" Width="110px"></asp:Label> <telerik:RadComboBox ID="ddlRM" runat="server" Skin="Web20" AllowCustomText="false" MarkFirstMatch="true" Width="200px"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvRM" runat="server" ControlToValidate="ddlRM" ValidationGroup="valSummary" ErrorMessage="Project RM Required">*</asp:RequiredFieldValidator> </div> <div class="divLabel"> <asp:Label ID="lblPM" runat="server" SkinID="Label_Bold_8pt" Text="Project PM:" Width="110px"></asp:Label> <telerik:RadComboBox ID="ddlPM" runat="server" Skin="Web20" AllowCustomText="false" MarkFirstMatch="true" Width="200px"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvPM" runat="server" ControlToValidate="ddlPM" ValidationGroup="valSummary" ErrorMessage="Project PM Required">*</asp:RequiredFieldValidator> </div> <div class="divLabel"> <table> <tr> <td> <asp:Label ID="lblDescription" runat="server" SkinID="Label_Bold_8pt" Text="Project Desc:" Width="110px"></asp:Label> </td> <td> <telerik:RadEditor ID="txtDesc" runat="server" Width="600" Height="150px" StripFormattingOptions="All" AllowScripts="false"> <CssFiles> <telerik:EditorCssFile Value="../App_Themes/Control Themes/EditorContentArea.css" /> </CssFiles> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="AjaxSpellCheck" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <asp:RequiredFieldValidator ID="rfvDesc" runat="server" ControlToValidate="txtDesc" ErrorMessage="Project Desc Required" ValidationGroup="valSummary">*</asp:RequiredFieldValidator> </td> </tr> </table> </div> </div> </div> </telerik:RadAjaxPanel> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Top" EnableSkinTransparency="true" Transparency="25" Skin="Web20" /> </div></asp:Content>protected void btnNext_Click(object sender, EventArgs e) { SaveProject(); divDetails.Visible = true; btnNext.Visible = false; }
edit.get_toolAdapter().getToolByName("MainToolbar").get_Items()