Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
91 views

I have a stand alone form used for time entry.  i display entries in a radgrid.  intead of using the pop up edit form, I just want to prefill some values in my user control to do the edit.   I cannot seem to find the control with this code.  i have definitely verified the names are correct.  It says  u  is nothing then errors when I try to find a drop down list.

Protected Sub rgTimeslips_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles rgTimeslips.ItemCommand
 
 
     LogID = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("KeyID")
     DocID = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("SONumber")
     Label7.Text = LogID & "," & DocID
 
 
     pnlForm.Visible = True
     pnlLogGrid.Visible = False
 
      
     'set values of Time Entry user control
     Dim u As UserControl = TryCast(FindControl("TimeEntry2"), UserControl)
     Dim ddlso As DropDownList = TryCast(u.FindControl("ddlSO"), DropDownList)
     ddlso.SelectedValue = DocID
     Dim SOLogKeyID As HiddenField = TryCast(u.FindControl("SOLogKeyID"), HiddenField)
     Dim TimeSlipKeyID As HiddenField = TryCast(u.FindControl("TimeSlipKeyID"), HiddenField)
     If DocID = 0 Then
         SOLogKeyID.Value = "0"
         TimeSlipKeyID.Value = LogID
     Else
         SOLogKeyID.Value = LogID
         TimeSlipKeyID.Value = "0"
     End If
     ddlso.Enabled = False
 
 
 
 End Sub
David
Top achievements
Rank 1
 asked on 21 Jul 2011
0 answers
78 views
First excuse my english. I have a grid in my page and a method in a WCF Data Service:

<telerik:RadGrid ID="rgDepartaments" runat="server" AllowPaging="true" AllowSorting="true"
    AllowFilteringByColumn="true" PageSize="10" AllowMultiRowEdit="true" OnItemCreated="rgDepartaments_ItemCreated">
    <MasterTableView DataKeyNames="IdDepartament" ClientDataKeyNames="IdDepartament" CommandItemDisplay="Bottom">
        <Columns>           
            <telerik:GridBoundColumn UniqueName="Departament" DataField="Departamento" DataType="System.String">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn UniqueName="UpdateDate" DataField="UpdateDate"
                DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy HH:mm}" HeaderStyle-Width="150px">
            </telerik:GridDateTimeColumn>           
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <DataBinding Location="~/DesktopModules/Comun/Services/DepartmentSvc.svc" SelectCountMethod="TotalDepartments">
            <DataService TableName="Departament" />
        </DataBinding>
    </ClientSettings>
</telerik:RadGrid>

[WebGet]
public int TotalDepartments(string where)
{
    return String.IsNullOrEmpty(where) ? this.CurrentDataSource.Department.Count() : this.CurrentDataSource.Department.Where(where).Count();
}

I have 2 problems:
1-  When the TotalDepartments is executed with a where condition having a UpdateDate filter I get the following error: Edm.DateTime and Edm.String are not compatible types.

2.- The grid contains 5 records with UpdateDate (21/07/2011 --> 21st July 2011). When I try to filter through UpdateDate width 16/07/2011 and "major than" I get no record (all records must have been returned). By if I filter with 16/07/2001 and "less than" I get all the records (no record must have been returned).

Where is the problem?, Maybe the culture or the DataFormatString?. I've been looking in Google but I can get no answer.

Thanks in advance.
Iker Llanos
Top achievements
Rank 1
 asked on 21 Jul 2011
0 answers
124 views
Hi everyone!
I'm from brazil so i don't speak english very well... sorry! :-\
I have a little problem here..
When a put a date in RadCombo to used autocomplete function it bring me result but not to show anything...
It show me result only if i put a string (word..etc..)
Why?

My search code:

Dim exp As String = "(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"
Dim sql As String = ""
Dim DATE_EXP As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(e.Text, exp)
 
sql = "SELECT NAMECOLUMNS from TABLE "
        If DATE_EXP .Success Then
            sql += " where CONVERT(VARCHAR(12),DATE_COLUMN,103) = CONVERT(VARCHAR(12), '" & e.Text & "', 103) "
        Else
            sql += " WHERE OTHERCOLUMN LIKE '%" + e.Text + "%'"
        End If
      
SessionDataSource1.SelectCommand = sql
 

										
Jorge
Top achievements
Rank 1
 asked on 21 Jul 2011
1 answer
113 views
Hello

My page use Gird to paging, http://www.vuakiengmiennam.com. My page show all product and have 2 page. I click Page 2, it not run and show error, i have attach file. Please help me. I use both Firefox and IE

 <div id="menubody">
          
                            <uc1:menu ID="menu1" runat="server" />
                       
            

            </div>
 <div id="products">        
     
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
     </telerik:RadScriptManager>
   
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                     <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                     <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
                     </UpdatedControls>
                     </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
                            
                        </UpdatedControls>
                        </telerik:AjaxSetting>
                    
                  
                                                        
                </AjaxSettings>
            </telerik:RadAjaxManager>
          
          
      
          
           <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1"
            runat="server" GridLines="None" AllowPaging="True" OnPreRender="RadGrid1_PreRender"
            PageSize="9" CellSpacing="0" ShowHeader="False" Width="555px"
         BorderWidth="0px">
            <PagerStyle Mode="NextPrevAndNumeric" />
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

               <FooterStyle BorderWidth="0px" />
               <AlternatingItemStyle BorderWidth="0px" />

               <ItemStyle BackColor="#1A8218" BorderWidth="0px" />

            <MasterTableView TableLayout="Fixed" ForeColor="#003300" BorderWidth="0px"
                   HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <ItemTemplate>
                    <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %>
                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                        runat="server">
                         <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" DataValue='<%# Eval("Hinh")%>' Width="150" Height="100" ResizeMode="Crop" />
                       <br />
                        <b>Tên:</b>
                        <%# Eval("Tencay")%>
                        <br />
                        <b>Giá</b>
                        <%# Eval("Gia")%>
                        <br />
                        <b>CK:</b>
                        <%# Eval("Huehong")%>  <a href="dproducts.aspx?idcay=<%# Eval("id") %>" ><img src="images/chitiet.gif"/ border="0px"></a></asp:Panel>
                </ItemTemplate>

<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
    <HeaderStyle BorderWidth="0px" />
    <ItemStyle BorderWidth="0px" />
                </RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

                <Columns>
                    <telerik:GridBoundColumn DataField="id" DataType="System.Int32"
                        FilterControlAltText="Filter id column" HeaderText="id" SortExpression="id"
                        UniqueName="id">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="idloaicay" DataType="System.Byte"
                        FilterControlAltText="Filter idloaicay column" HeaderText="idloaicay"
                        SortExpression="idloaicay" UniqueName="idloaicay">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Tencay"
                        FilterControlAltText="Filter Tencay column" HeaderText="Tencay"
                        SortExpression="Tencay" UniqueName="Tencay">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Gioithieu"
                        FilterControlAltText="Filter Gioithieu column" HeaderText="Gioithieu"
                        SortExpression="Gioithieu" UniqueName="Gioithieu">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Gia"
                        FilterControlAltText="Filter Gia column" HeaderText="Gia" SortExpression="Gia"
                        UniqueName="Gia">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Huehong"
                        FilterControlAltText="Filter Huehong column" HeaderText="Huehong"
                        SortExpression="Huehong" UniqueName="Huehong">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="Ngaycapnhat" DataType="System.DateTime"
                        FilterControlAltText="Filter Ngaycapnhat column" HeaderText="Ngaycapnhat"
                        SortExpression="Ngaycapnhat" UniqueName="Ngaycapnhat">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Trangthai"
                        FilterControlAltText="Filter Trangthai column" HeaderText="Trangthai"
                        SortExpression="Trangthai" UniqueName="Trangthai">
                    </telerik:GridBoundColumn>
                </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
                <ItemStyle BackColor="#009933" BorderColor="#009933" BorderWidth="0px" />
                <AlternatingItemStyle BorderWidth="0px" />
                <HeaderStyle BackColor="#339966" />
            </MasterTableView>
               <HeaderStyle BorderWidth="0px" />
            <GroupingSettings CaseSensitive="false" />

               <GroupHeaderItemStyle BorderWidth="0px" />

<FilterMenu EnableImageSprites="False"></FilterMenu>
               <EditItemStyle BorderWidth="0px" />
               <ActiveItemStyle BorderWidth="0px" />
               <CommandItemStyle BorderWidth="0px" />
        </telerik:RadGrid>
          
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:vuakiengmiennamConnectionString %>"
                        
                        SelectCommand="sp_showcaykiengtheoloai"
         SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:QueryStringParameter DefaultValue="0" Name="loaicay" QueryStringField="id"
                                Type="Byte" />
                        </SelectParameters>
                    </asp:SqlDataSource>
Vasil
Telerik team
 answered on 21 Jul 2011
7 answers
138 views
Hello,

I am just having a play with the SharePoint WebParts in the Telerik SharePoint Acceleration Kit, and I had a question.

Is there any way for the WebParts to get the data to display through a WebPart Connection, rather than from a place (SQL Server, SharePoint List, Excel) defined within the WebPart itself?

Thanks

Gary
Tsvetoslav
Telerik team
 answered on 21 Jul 2011
1 answer
100 views
Hi,

I am totally new developer for Telerik controls.
I want to know that how much they are easy to use in asp.net 4.0 site?
Is they are same as asp.net controls which are just drag and drop controls? I saw in various examples on demos site there I found that these controls are typical to implement because they are too much different with other controls providers. In these examples most of them use jquery and lots of client side code. If we don't use this jquery code and client side code in that case these controls will work or not?
My client going to be purchased a "Telerik Premium Collection for .NET" of these controls, so it can be possible that we get demo code for all controls with simple understanding code.

Slav
Telerik team
 answered on 21 Jul 2011
2 answers
401 views
For our solution, we need to present a number of dynamic dropdowns with descriptive text choices but show only the simple Id key when the choice has been made.  To achieve this today I have provided a simple example code snippet from a test.aspx file showing the basics of how we are achieving this.
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
<%
    System.Collections.Generic.List<RadComboBoxItem> choices = new System.Collections.Generic.List<RadComboBoxItem>();
    for(int i=1; i <= 10; i++)
    {   choices.Add(new RadComboBoxItem("" + i + "- Complex Display Detail", "" + i));
    }
    RadComboBox1.DataSource = choices;
    RadComboBox1.DataBind();
%>
<telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="true"
        DataTextField="Value" DataValueField="Value" Width="333px" CheckBoxes="false">
    <ItemTemplate>
        <asp:Label runat="server"><%# Eval("Text") %></asp:Label>
    </ItemTemplate>
</telerik:RadComboBox>
So if someone picks the "5 - Complex Display Detail" it will fill in the RadComboBox with 5.  For me, that is straight forward and functions as expected. 

The problem comes in if we want to now use the CheckBoxes="true" feature added to the latest release.  In this case it will not render properly due to the ItemTemplate.  So I have one of two choices:
  1. Figure out a way to have the checkboxes render as part of my customized template with similar results showing complex choices but simple display on selection.
  2. I need an alternate way to show Complex choices but have the actual choice showing on the RadComboBox as the code and not the complex choice description.

A good real world example would be to list the states by name but when you pick the state only have the 2 letter abbreviation show for the text to be submitted on the request (ie. pick Minnesota from the list of choices but have MN appear as the text for the RadComboBox request text).

Thanks,
Shane
Shane
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
51 views

Telerik.Web.UI.RadGrid with ID='rgReport' was unable to find embedded skin with name 'Excel'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.


Vista skin works fine but this one doesn't.

I assumed it should be in the Telerik.Web.UI.dll but it doesn't seem to be there.

Thanks,
Andrey
Telerik team
 answered on 21 Jul 2011
4 answers
112 views
Hi All,

I have found one very strange bug in the telerik grid filter functionality.

I have used basic filter functionality like below :

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

Its working fine if i used Rad Ajax Loading Panel like below :

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="rad1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgTest">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgTest" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

But if I provide Skin for the Rad Ajax Loading Panel then first time focus lost from filter textbox and after that it did not work properly. Textbox focus not lost from filter textbox and i can not even add new characters or delete characters I need to once again set focus explicitly on the filter textbox to do any changes.

Below find code that cause above issue :

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
    </telerik:RadAjaxLoadingPanel
    <telerik:RadAjaxManager ID="rad1" runat="server"
        <AjaxSettings
            <telerik:AjaxSetting AjaxControlID="rgTest"
                <UpdatedControls
                    <telerik:AjaxUpdatedControl ControlID="rgTest" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls
            </telerik:AjaxSetting
        </AjaxSettings
    </telerik:RadAjaxManager>
Ruchi
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
72 views
Hi.
I'm trying to get this scenario and can't get it working.
My Radgrid is bounded to a LinQDatasource.
In edit or insert mode, I need to filter each DropDownColumn with the values of previous one
(DropDown 1: Family, DropDown2 (Part Number), DropDown3 (Description) etc...)
So, in my DataSource, i have several tables (Family, Parts....), linked by hard links.
I have already managed to get all the DropDownColumn correctly populated, each with a different DS.

My problem is that I can't get the value of the first dropdown column to get only the good rows from the second datasource.

There is no ControlID on the GridDropDownColumn, so I can't use it in the controlParameter.

Should I use the selected event of the LinQDataSource to filter the results ?

Thanks in advance.
ERWAN LE BIHAN
Top achievements
Rank 1
 answered on 21 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?