Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
447 views
Hello,

I have a radgrid with GridDateTimeColumn

<

 

telerik:GridDateTimeColumn DataField="Date_input" HeaderText="Date"

 

 

UniqueName="Date_input" ReadOnly ="true"

 

 

DataType="System.DateTime">

 

 

<ItemStyle Width="130px" />

 

 

</telerik:GridDateTimeColumn>

OR

 

<

 

telerik:GridDateTimeColumn DataField="Date_input" HeaderText="Date"

 

 

UniqueName="Date_input" ReadOnly ="true"

 

 

DataFormatString="{0:dd/MM/yyyy}" DataType="System.DateTime">

 

 

 

 

 

<ItemStyle Width="130px" />

 

 

 

 

 

</telerik:GridDateTimeColumn>

In my MSSQL database it is a datetime value ex : 20/01/2009 11:20:10

My problem it is when a put exat date value in filter field, only date ... that don't work... per exemple : 20/01/2009, my row with 20/01/2009 11:20:10, not display ...

i try http://www.telerik.com/help/aspnet-ajax/grdfilteringfordatetimecolumnwithdataformatstring.html for other date format but i is not ... that work when i make greatthan filter .... i suppose that 20/01/2009 11:20:10 is not same than 20/01/2009 , it is correct in fact ...

Do you have a solution for have results with 20/01/2009 ?

 

Vasil
Telerik team
 answered on 17 Oct 2012
4 answers
301 views
Hi All:
    As below, I want to set the label no-show when I click the "Delete" Button. But it is not fire.
    <telerik:RadGrid ID="RadGrid1" runat="server"
        AutoGenerateColumns="False" CellSpacing="0" AllowPaging="True" GridLines="None" Skin="Default">
  
<MasterTableView>
 
 
 
    <Columns>
        <telerik:GridTemplateColumn DataField="AREA_ZIP_CODE" UniqueName="AREA_ZIP_CODE">
            <HeaderTemplate>
                <asp:Label ID="Label2" runat="server" Text="AREA_ZIP_CODE"></asp:Label>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("AREA_ZIP_CODE") %>' Visible=false></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="AREA_ZIP_DESC" UniqueName="AREA_ZIP_DESC">
            <HeaderTemplate>
                <asp:Label ID="Label3" runat="server" Text="AREA_ZIP_DESC"></asp:Label>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Eval("AREA_ZIP_DESC") %>' Visible=false></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="ACTIVE_FLAG" HeaderText="ACTIVE_FLAG"
            SortExpression="ACTIVE_FLAG" UniqueName="ACTIVE_FLAG">
        </telerik:GridBoundColumn>
         
        <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="Delete">
            <ItemTemplate>
                <asp:Button ID="Button1" runat="server" Text="Delete" CommandName="Delete" />
                <asp:Button ID="Button2" runat="server" Text="Cancel" CommandName="Cancel" />
            </ItemTemplate>
        </telerik:GridTemplateColumn>
         
    </Columns>
 
    <PagerStyle AlwaysVisible="True" />
 
</MasterTableView>
 
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
Protected Sub RadGrid1_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
    If e.CommandName = "Delete" Then
        Delete(sender, e)
    ElseIf e.CommandName = "Cancel" Then
        Cancel(sender, e)
    End If
 
End Sub
 
Protected Sub Delete(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs)
    Dim rowNum As Integer = Convert.ToInt32(e.Item.ItemIndex)
    Dim item As GridDataItem = RadGrid1.Items(rowNum)
    Dim lb As Label
 
    For Each row As GridDataItem In RadGrid1.Items
        lb = item.FindControl("Label1")
        If row.ItemIndex <> rowNum Then
            lb.Visible = False
        ElseIf row.ItemIndex = rowNum Then
            lb.Visible = True
        End If
    Next
End Sub
 
Protected Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
    Dim da As New SqlDataAdapter
    Dim con As New SqlConnection
    Dim com As New SqlCommand
    con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db.mdf;Integrated Security=True;User Instance=True"
    con.Open()
    com.Connection = con
    com.CommandText = "SELECT * FROM [area_zip_table]"
    da.SelectCommand = com
    Dim dt As New DataTable
    da.Fill(dt)
    RadGrid1.DataSource = dt
End Sub
Singl Pang
Top achievements
Rank 1
 answered on 17 Oct 2012
11 answers
409 views
Hello,

Can you provide us the correct files .nupkg for the telerik controls, to create internal repository.

Thanks!!
Andrey
Telerik team
 answered on 17 Oct 2012
3 answers
417 views
I am trying to open the Pop Up window Asynchronously. Due to lengthy Database operation. I am waiting to open the Pop up for approximately 35 seconds...The Problem gets worst when the internet speed is very slow. In that case a lot of time. I am using the below mentioned code...

<telerik:RadWindowManager
        ID
="RadWindowManager1"
        ShowContentDuringLoad
="false"
                VisibleStatusbar="false"
       
runat="server"
        VisibleOnPageLoad="false"
        Width="894px"
        Modal="true"
        Behaviors="None"
       
EnableEmbeddedSkins="false"
        EnableShadow="true"
        OnClientClose="OnClientClose"
       
ReloadOnShow="false">
     <Windows>
          <telerik:RadWindow ID="radPopup" runat="server" KeepInScreenBounds="true" EnableShadow="true" />
     </Windows>
</telerik:RadWindowManager>

My Query is, What should I do to open the Pop Up first and in the Background the Database Operation is being executed...and during this operation the user may be informed about the busy operation...
Princy
Top achievements
Rank 2
 answered on 17 Oct 2012
3 answers
453 views
Hello, 

Quite accidentally, I've found an interesting behavior with the RadGrid's GridTemplateColumn:

<telerik:RadGrid runat="server" ID="radgrid" AutoGenerateColumns="false" OnNeedDataSource="radgrid_NeedDataSource">
    <MasterTableView>
        <Columns>
            <telerik:GridTemplateColumn DataField="Text" HeaderText="foo">
                <ItemTemplate>
                    <%# Eval("Text") %>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="Text" HeaderText="bar" Visible="false" />
            <telerik:GridEditCommandColumn HeaderText="Edit" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

In normal mode, the GridTemplateColumn will be visible, but when in edit mode, it's the GridBoundColumn that's visible. You can tell by the HeaderText that's displayed in the edit form.

Out of curiosity, is this an intended behavior?
Shinu
Top achievements
Rank 2
 answered on 17 Oct 2012
0 answers
167 views
 
 

my scheduler control need to display 30 days of data. please refer to  attach: pagejpg.
but  pdf  file information is display not complate.  please refer to  attach: pdf.jpg.

Who can help me solve the problem?  thanks!!!
123
Top achievements
Rank 1
 asked on 17 Oct 2012
1 answer
155 views
Is it possible to export to Excel without the file opening as Read Only?  I have looked at every option and example and simply do not see the option/parameter to make this happen.
Kyle
Top achievements
Rank 1
 answered on 16 Oct 2012
3 answers
184 views
Hello Telerik Community:

I have the following issue, using the following code I get the results shown in the attached image.

Is there anyway to autostep or show only the dates that have some value on them?

Thanks in advance!


//OADate column for chart:
 
 DataColumn col = new DataColumn("OADate", typeof(System.Double));
 dtable.Columns.Add(col);
 
//Converting SQL Datetime values to OADate column
 
 int b = 0;
 foreach (DataRow row in dtMerArrCru.Rows)
 {
     row["OADate"] = Convert.ToDateTime(dtable.Rows[b][1]).ToOADate();
     b++;
 }
 
//Formatting chart:
 
 RadChart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
 RadChart1.PlotArea.XAxis.Appearance.CustomFormat = "MM/dd/yyyy";
 RadChart1.PlotArea.XAxis.IsZeroBased = false;
 RadChart1.PlotArea.XAxis.AutoScale = false;
 
 RadChart1.PlotArea.XAxis.AddRange(Convert.ToDouble(dtMerArrCru.Rows[0]["OADate"]),     Convert.ToDouble(dtMerArrCru.Rows[dtMerArrCru.Rows.Count - 1]["OADate"]), 1);
 
 RadChart1.DataGroupColumn = "Type";
 RadChart1.DataManager.ValuesXColumn = "OADate";
 RadChart1.DataManager.ValuesYColumns = new string[] { "Quantity" };
 RadChart1.DataSource = dtable;
 RadChart1.DataBind();
Petar Kirov
Telerik team
 answered on 16 Oct 2012
3 answers
141 views
I'm using the ItemTemplate. In the template I have one user control which consists of a button and another control. The button controls the visibility of the other control. Not every instance of this user control is the same size. When the controls are initially hidden, clicking the buttons will reveal their respective controls as desired. However, when any of the controls are not initially hidden, the list view sizes all it's items to the potentially largest control whether or not that control is hidden. Any ideas why this would be occuring and how I can work around it? Thanks.
Matthew
Top achievements
Rank 1
 answered on 16 Oct 2012
6 answers
413 views
I am using the RadCombobox with design time datasource setting because I need to use the Itemperrequest property. I know itemperrequest and showmoreresult property don't work if you have dynamic datasource setting. Because of designtime datasource setup, I don't know how to set the default value to the combo using valuefield. 

Help me here.
Vijaianand
Top achievements
Rank 1
 answered on 16 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?