Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
72 views
I am dynamically generating a list of columns for a radgrid and everything there is fine the issue that occurs when I'm trying to convert a GridBoundcColumn to a GridDropDownListColumnEditor on the CreateColumnEditor

I was wondering if it was possible to add to add a drop down list, combo box or even a lookup button to the edit template on the radgrid
*Note the datatable is just for testing the columns are coming from a database

Public Property DT As DataTable
     Get
         Return ViewState("DT")
     End Get
     Set(ByVal value As DataTable)
         ViewState("DT") = value
     End Set
 End Property
 
 
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     If Not Page.IsPostBack Then
         AddEditColumn()
         DT = GetData()
     End If
 End Sub
 
 
 Private Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
     Me.RadGrid1.DataSource = DT
 End Sub
 
 Sub AddEditColumn()
     If Not RadGrid1.Columns.Contains("GridEditCommandColumn") Then
         Dim EditCol As New GridEditCommandColumn
         RadGrid1.Columns.Add(EditCol)
     End If
 End Sub
 
 Private Sub RadGrid1_CreateColumnEditor(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCreateColumnEditorEventArgs) Handles RadGrid1.CreateColumnEditor
     If (TypeOf e.Column Is GridBoundColumn) Then
         If (CType(e.Column, GridBoundColumn).DataField = "Customer") Then
             e.ColumnEditor = New GridTextBoxColumnEditor
             'e.ColumnEditor.ContainerControl.Controls
         ElseIf (CType(e.Column, GridBoundColumn).DataField = "CustomerType") Then
             'e.ColumnEditor = New GridDropDownListColumnEditor
         End If
     End If
 End Sub
 
 Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
     If (TypeOf e.Item Is GridDataItem) Then
         Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
 
     ElseIf (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
         Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
     End If
 End Sub
 
 Private Function GetData()
     Dim datatable As New DataTable
     datatable.Columns.Add("Customer", GetType(String))
 
     datatable.Columns.Add("CustomerType", GetType(String))
     '********************************************************
     'CustomerType is the Column that needs to be a drop down.     
    
'********************************************************
 
     datatable.Columns.Add("QtyOrd", GetType(Integer))
     datatable.Columns.Add("Date1", GetType(Date))
     datatable.Columns.Add("Date2", GetType(Date))
     datatable.Columns.Add("OnTime", GetType(Boolean))
 
     datatable.Rows.Add({("A&A Beef"), ("WHOL"), 1, DateTime.Now, DateTime.Now, False})
     datatable.Rows.Add({("Vegmart"), ("RET"), 8, DateTime.Now, DateTime.Now, False})
 
     Return datatable
 End Function
Andy
Top achievements
Rank 1
 asked on 02 Jul 2012
2 answers
354 views

Hi,

The erra of issues are not just ending for me.

I am trying to use RadWindow control for modal popup in my application. I have encountered one javascript error while page load.

sys.WebForms is undefined

sys.WebForms is undefined -&nbsp;<BR>Error: Sys.WebForms is undefined<BR>Source   
File: <A   
href="http://nfgprimary4/NPO/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3bTelerik.Web.UI%3aen-US%3a18aed5cb-2fcd-4178-ac4d-382193252b8a%3a16e4e7cd%3af7645509%3aed16cbdc%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4">http://nfgprimary4/NPO/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3bTelerik.Web.UI%3aen-US%3a18aed5cb-2fcd-4178-ac4d-382193252b8a%3a16e4e7cd%3af7645509%3aed16cbdc%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4</A><BR>Line:   
965 

If I use the same code under web application its working fine. But I am hosting my application as WebSite.

Please give me some input asap as I am completely stuck on this.

Regards,
Vinayak
Joshua
Top achievements
Rank 1
 answered on 02 Jul 2012
7 answers
1.7K+ views
Hi, i'm getting this error on this line (window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)]=this;)
when use IIS for debugging
and at the same time  sys is not null, but WebForms is null

Moreover RadAjax.Net2 controls work fine, but Telerik.Web.UI don't. 

here is my sample
 
<asp:ScriptManager ID="ScriptManager" runat="server" /> 
 <telerik:RadAjaxManager EnableAJAX=true ID="RadAjaxManager1" runat="server"
</telerik:RadAjaxManager>  

my web config
<httpHandlers> 
            <remove path="*.asmx" verb="*"/> 
            <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> 
        </httpHandlers> 
        <httpModules> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </httpModules> 
 
 
<system.webServer> 
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules> 
            <remove name="ScriptModule"/> 
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </modules> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/> 
            <remove name="ScriptHandlerFactory"/> 
            <remove name="ScriptHandlerFactoryAppServices"/> 
            <remove name="ScriptResource"/> 
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <remove name="Telerik.Web.UI.WebResource"/> 
            <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> 
 
        </handlers> 
    </system.webServer> 
environment

Visual Studio 2008
Microsoft.Net 3.5 sp1
Vista business sp1 IIS7
Telerik.Web.UI, Version=2008.2.826.35

Any ideas?



Joshua
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
94 views
Heya all!
We want to use Telerik .Net Ajax Controllers but we are confused about pricing with developer & product count. We want to use Telerik in more than one product and we have 8-10 developers in our team. But no-one will develope Telerik controls(Maybe just one dev. in some situations). Should we buy more than one license? Can anyone contact me via forum or mail?
James Campbell
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
259 views
Dear All,

 We are developing project using asp.net with c sharp  and I have TreeList in my page with checkbox but when i select parent checkbox child checkbox not checked what i need to do solve this..
my aspx code is
                               <telerik:RadTreeList ID="radTreelistLocation" runat="server" OnItemDataBound="radTreelistLocation_ItemDataBound"
    AutoGenerateColumns="false" ParentDataKeyNames="ParentLocationId" AllowMultiItemSelection="true"
    ShowTreeLines="true" OnNeedDataSource="RadTreeList1_NeedDataSource" AllowPaging="true"
    PageSize="50" DataKeyNames="ID" AllowSorting="true">
    <Columns>
        <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
            <ItemTemplate>
                <asp:CheckBox ID="chkAssign" runat="server" Checked='<%# Eval("IsChecked") %>' OnCheckedChanged="chkAssign_CheckChanged" />
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
        <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
            <ItemTemplate>
                <asp:Label ID="lblLocationName" runat="server" Text='<%#Eval("Name") %>' />
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
   </Columns>
</telerik:RadTreeList>
And My aspx.cs page code is.
        protected void Page_Load(object sender, EventArgs e)
        {
             
            if (!Page.IsPostBack)
            {
                PopulateUsers();
                radTreelistLocation.ExpandAllItems();
                bindGrid();
            }
        }
        protected void RadTreeList1_NeedDataSource(object sender, EventArgs e)
        {
            radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
        }
        public void bindGrid()
        {
            List<Location> locationlist = new List<Location>();
            locationlist = _applicationProcess.SelectLocations();
            radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
            radTreelistLocation.DataBind();
            ViewState["location"] = locationlist;
        }
}

Thanks in Advance..!
Tsvetina
Telerik team
 answered on 02 Jul 2012
7 answers
712 views
Hi, I need help with AsyncUpload i dont know  how to hide select button.Help me please.
Mark Hynes
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
277 views
Hi,

I have a grid with one GridTableView in <DetailTables> section. In GridTableView, first column is GridTemplateColumn with checkbox. I put one checkbox in GridTableView's command item to implement "Select All" functionality, so when user select this checkbox, particular details tables all rows checkbox should be selected. I want to implement this functionality on client side using javascript if possible otherwise server side code will be also fine.

<telerik:RadGrid ID="radGridReconStatus" GridLines="None" AutoGenerateColumns="false"
        ShowFooter="true" Width="1000px" AllowPaging="false" AllowSorting="true" runat="server"
        AllowAutomaticUpdates="false" Skin="Outlook" Visible="true" OnDetailTableDataBind="radGridReconStatus_DetailTableDataBind"
        OnItemDataBound="radGridReconStatus_ItemDataBound" OnNeedDataSource="radGridReconStatus_NeedDataSource"
        OnItemCommand="radGridReconStatus_ItemCommand">
        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"
            HideStructureColumns="true">
            <Pdf PageWidth="1000px" />
        </ExportSettings>
        <HeaderStyle Font-Bold="true" />
        <MasterTableView ShowFooter="true" DataKeyNames="ID" CommandItemDisplay="None">
            <DetailTables>
                <telerik:GridTableView Width="100%" DataKeyNames="REVIEW_ID, KEY_ID" runat="server" Name="Detail"
                    AutoGenerateColumns="false" ShowHeader="true" GridLines="None" AlternatingItemStyle-BackColor="AliceBlue"
                    CommandItemDisplay="Top">
                    <GroupHeaderItemStyle Font-Bold="true" />
                    <CommandItemTemplate>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td style="color: White;">
                                    <asp:CheckBox ID="chkSelectAll" runat="server" /><b>Select all</b>
                                </td>
                                <td align="right" style="color: White;">
                                    <asp:LinkButton ID="lnkDeleteInternal" runat="server" Font-Bold="true" Text="Delete Internal"
                                        CommandName="DeleteInternal" />
                                       
                                    <asp:LinkButton ID="lnkDeleteExternal" runat="server" Font-Bold="true" Text="Delete External"
                                        CommandName="DeleteExternal" />
                                       
                                    <asp:LinkButton ID="lnkDeleteBoth" runat="server" Font-Bold="true" Text="Delete Both"
                                        CommandName="DeleteBoth" />
                                       
                                </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>
                    <%--<ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="REVIEW_ID" MasterKeyField="REVIEW_ID" />
                    </ParentTableRelation>--%>
                    <Columns>
                        <telerik:GridBoundColumn DataField="KEY_ID" UniqueName="KEY_ID" Visible="false" />
                        <telerik:GridTemplateColumn HeaderText="Select" ItemStyle-Width="50px" UniqueName="CHECK_COLUMN">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkSelect" runat="server" Enabled="true" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="KEY_NAME" UniqueName="KEY_NAME" Visible="false"
                            HeaderText="Total Breaks" />
                        <telerik:GridBoundColumn DataField="TRANSACTION_TYPE" UniqueName="TRANSACTION_TYPE"
                            HeaderText="Transaction Type" Visible="true" ItemStyle-Width="250px" />
                        <telerik:GridBoundColumn DataField="INTERNAL_AMOUNT" UniqueName="INTERNAL_AMOUNT"
                            Visible="true" HeaderText="Internal System Amount" ItemStyle-Width="150px" DataFormatString="{0:#,###0}" />
                        <telerik:GridBoundColumn DataField="EXTERNAL_AMOUNT" UniqueName="EXTERNAL_AMOUNT"
                            Visible="true" HeaderText="External Party Amount" ItemStyle-Width="150px" DataFormatString="{0:#,###0}" />
                        <telerik:GridBoundColumn DataField="VARIANCE" UniqueName="VARIANCE" Visible="true"
                            HeaderText="Difference" ItemStyle-Width="100px" DataFormatString="{0:#,###0}" />
                    </Columns>
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridBoundColumn DataField="REVIEW_ID" UniqueName="REVIEW_ID" Visible="false" />
                <telerik:GridBoundColumn DataField="RECON_ID" UniqueName="RECON_ID" Visible="false" />
                <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false" />
                <telerik:GridBoundColumn DataField="REVIEW_COLUMN_VALUE_1" HeaderText="Key1" UniqueName="REVIEW_COLUMN_VALUE_1" />
                <telerik:GridBoundColumn DataField="REVIEW_COLUMN_VALUE_2" HeaderText="Key2" UniqueName="REVIEW_COLUMN_VALUE_2" />
                <telerik:GridBoundColumn DataField="REVIEW_COLUMN_VALUE_3" HeaderText="Key3" UniqueName="REVIEW_COLUMN_VALUE_3" />
                <telerik:GridBoundColumn DataField="REVIEW_COLUMN_VALUE_4" HeaderText="Key4" UniqueName="REVIEW_COLUMN_VALUE_4" />
                <telerik:GridBoundColumn DataField="REVIEW_COLUMN_VALUE_5" HeaderText="Key5" UniqueName="REVIEW_COLUMN_VALUE_5" />
                <telerik:GridBoundColumn DataField="INTERNAL_LOAD_DATE" HeaderText="Internal Load Date"
                    DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="75px" />
                <telerik:GridBoundColumn DataField="EXTERNAL_LOAD_DATE" HeaderText="External Load Date"
                    DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="75px" />
                <telerik:GridBoundColumn DataField="REVIEW_STATUS" HeaderText="REVIEW STATUS" UniqueName="REVIEW_STATUS" />
                <telerik:GridBoundColumn DataField="BreakCount" HeaderText="BreakCount" UniqueName="BreakCount" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

Can anyone help  me implementing this functionality?

Thanks
Vatsal
Elliott
Top achievements
Rank 2
 answered on 02 Jul 2012
1 answer
117 views
My computer crashed so we had to rebuild it.  I downloaded the most recent telerik files that I had licenses to.

I have some sites that used the older versions.  

So when I opened them, I'm getting the error 
"Failed to create designer 'Telerik.Web.UI.xxx version 2011.1.519.35 etc"

how to I fix that?

Thank you.
Eyup
Telerik team
 answered on 02 Jul 2012
1 answer
106 views
Hi.

I was looking for a way to select rows in radgrid client side and it works out of the box from samples.

But now i want to change row selection, I'm loading items from database and have an list of previously selected items.

The previous items are the already selected items, so i want to load all items and select the checkboxes for previous items.

So if i have a list of eg. 5 items, i have selected 3 and save, now i load the 5 items and want to select this 3 i already choose previously, but if i do it server side the client side does not reflect this, so how to do this?

Do i need to change all my code to server side row selection?
Eyup
Telerik team
 answered on 02 Jul 2012
1 answer
66 views
In editmode it works fine. In regular view mode it shows nbsp;
I think this is something to do with me using LinqtoSQL to populate? Can someone show me how to do this differentl so it works?

Thanks.

Justin Rumpf

<telerik:GridDropDownColumn DataSourceID="ReportNameddlist" ListTextField="ReportName"
    ListValueField="ReportName" UniqueName="ddReportName" SortExpression="ReportName"
    HeaderText="Report Name" DropDownControlType="DropDownList"
        DataField="ReportName">
</telerik:GridDropDownColumn>

editor =
CType(editMan.GetColumnEditor("ddReportName"), GridDropDownListColumnEditor)
Dim ReportNameddList As DropDownList = editor.DropDownListControl
ReportNameddList.DataSource = (From r In DbContext.SubscriptionReportNames Select r.ReportName).ToList()
ReportNameddList.DataBind()

Andrey
Telerik team
 answered on 02 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?