Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
107 views
hi
Below is my sql query whose output I intend to bind to RadGrid1.
But I get error on DateTime field ExpectedDate which is a RadDatePicker.

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime

My code is
string strSql = "Select 'Visitor''s Name'=VisitorsName,'Organisation'=VisitorsOrg ,
'Due at' =Arriving_at_hr+':'+Arriving_at_mm, 'Visiting'=Name, Faculty=Short_name , School=School ,
'Call Ext'=Extension,'Meeting room'=RoomNo,'Send to Room'=Send_to_room,Comments
from tblVisitors,tblservice where tblvisitors.Division=tblService.Faculty_Name and Centre='" + lstCentre.SelectedItem.Value + "'
and ExpectedDate = convert(varchar(50),'" + txtOnDate.SelectedDate.Value + "', 101) Order by Name";
          

Any quick help is appreciable!!!
I had to come up with this coz no one replied me for
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/linq-where-clause-in-aspx-with-datetime-does-not-work.aspx

Please this is not solved either!!!!
S
Sucheta Patil
Top achievements
Rank 1
 answered on 19 Oct 2010
1 answer
127 views
Is it possible to add a custom field to the upload dialog that displays within the FileExplorer when a filed is selected for upload?  The requirement is to display a category dropdown list next to each selected filename on the upload dialog.  The user will choose a category to assign to the selected file.  Clicking submit will upload the selected files to a file server, and update a SQL database with the filename and category. 

Thanks!
Michelle
Fiko
Telerik team
 answered on 19 Oct 2010
1 answer
67 views
HI,

I have radwindow on my page. I do not want titlebar on my window so I have set "VisibleTitlebar" property of radwindow to "False". But after setting this property, width of the Radwindow is not coming properly in FIrefox. Other browsers are displaying correct width but Firefox is dispalying window with very small width. Please let me know what else setting I need to do to get correct width in firefox.

Please reply ASAP.

Thanks,
Tarulatta Patel
Georgi Tunev
Telerik team
 answered on 19 Oct 2010
1 answer
136 views
Hi,

I'm using RadPanelBar Q1 2010 SP2. and having following scenario: I'm binding the top level items to List<T>. Then under each item I'd like to add ItemTemplate with quite a lot of controls inside (TextBoxes, GridView, etc.) so adding them dynamically in .cs isn't an option. Problem is that following declarative syntax displays right but doesn't expand :

ASPX:
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Vista" ExpandMode="FullExpandedItem" DataFieldParentID="Id" DataTextField="Name">
    <ItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </ItemTemplate>
</telerik:RadPanelBar>

CS:
ObjectiveCollection objectives = user.Objectives;
RadPanelBar1.DataSource = objectives;
RadPanelBar1.DataBind();
Nikolay Tsenkov
Telerik team
 answered on 19 Oct 2010
1 answer
96 views
Hi all,

I am very new to Telerik control.i am having a redtreenode in my page i am able to copy and paste the node from one parent node to other parent node but the problem is this the new node is always appearing at the end of the parent node, once i refresh the page then it is getting shorted but as i add the node it always adding at the end. i wanted it to get shorted immediately after adding the node and should appear in the shorted order does any body have any idea pls help me this is an urgency.

Thanks in advance
Rupesh
Nikolay Tsenkov
Telerik team
 answered on 19 Oct 2010
5 answers
761 views
Hi,

I am trying to update the use of a RadGrid to make it more efficient.  I have a series of textboxes in template columns on the grid so I can use editing of all templated cells (like in Excel).  But I need to update each record on data entry.  This all works OK if I only access each template column separately, but I'd like to read all text fields in the template row at once to keep the code in one place.

I have grid columns defined as:

<telerik:GridTemplateColumn UniqueName="Day1">
    <ItemTemplate>
        <asp:TextBox ID="Day1TextBox" runat="server" Width="40px" Enabled="true" OnTextChanged="Day1_TextChanged"
            AutoPostBack="true"></asp:TextBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Day2">
    <ItemTemplate>
        <asp:TextBox ID="Day2TextBox" runat="server" Width="40px" Enabled="true" OnTextChanged="Day2_TextChanged"
            AutoPostBack="true"></asp:TextBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Day3">
    <ItemTemplate>
        <asp:TextBox ID="Day3TextBox" runat="server" Width="40px" Enabled="true" OnTextChanged="Day3_TextChanged"
            AutoPostBack="true"></asp:TextBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>

In code behind I can access each coumn using:
Protected Sub Day2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim textbx As TextBox = sender
    Dim item As GridDataItem = textbx.NamingContainer
    Dim keyValues As String = item.KeyValues
    Dim p As Integer = InStr(keyValues, ":")
    Dim p2 As Integer = InStr(keyValues, "}")
    Dim strUniqueID As String = keyValues.Substring(p + 1, (p2 - p) - 3)
    Dim UniqueID As Integer = CInt(strUniqueID)

But what I really want to do is read each of the values from Day1TextBox, Day2TextBox etc when any of the values change.  I have tried the following but it is not right:
Protected Sub Day3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim editedItem As GridEditableItem = CType(CType(sender, TextBox).NamingContainer, GridEditableItem)
    Dim txtDay1 As TextBox = CType(editedItem("Day1TextBox").Controls(0), TextBox)
    Dim txtDay2 As TextBox = CType(editedItem("Day2TextBox").Controls(0), TextBox)
    Dim txtDay3 As TextBox = CType(editedItem("Day1TextBox").Controls(0), TextBox)
    CalculateLine(3, editedItem)

What I want to do is get a reference to each of the textbox fields in the templates.  I thought GridEditableItem might have worked but seems wrong.

Are there any suggestions how I can go about achieving this?  Thanks.

David Penny
Yeroon
Top achievements
Rank 2
 answered on 19 Oct 2010
2 answers
178 views
Hey everyone,

I am getting this error as in attached file,...And also i have another form--aspx
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
                    OnNeedDataSource="RadGrid1_NeedDataSource"AllowPaging="True" AllowSorting="True"
                    GridLines="None" Skin="Office2007" >
                        <MasterTableView>
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                        </MasterTableView>
                        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        </ClientSettings>
                    </telerik:RadGrid>
                </telerik:RadAjaxPanel>
cs is--
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            dtValues = new DataTable();
            dtValues.Columns.Add("Items");
            dtValues.Columns.Add("Rate");
            dtValues.Columns.Add("Quantity");
            dtValues.Columns.Add("Amount");
        }
it is not workin.Showing parser error.Don't know why?...plz help me resolve these?

Thanks
Amit
Pavlina
Telerik team
 answered on 19 Oct 2010
10 answers
714 views

Hello all,

How do I deploy Telerk.web.UI.dll on a shared hosting server? The instruction manual says we need to create a virtual directory and upload the telerik dll. In this case, where do i refer this path my application? 

thanks,
   

Vasil
Telerik team
 answered on 19 Oct 2010
1 answer
87 views
Hi, 
Radgrid collapse not working when HierarchyLoadMode="ServerOnDemand"; and when inside the nested view  panel and multipage are being used.
Pavlina
Telerik team
 answered on 19 Oct 2010
5 answers
213 views
Hi,

I have a RadGrid that puts the row into in inplace editmode if the user double clicks an item in the grid. Before the user can submit the row back to the server a JavaScript client-side validation routine is run on the row and this determines which fields in the row are invalid. I have references to all the controls in the row, this part works perfectly.

What I'd like to know is .. Is there a preferred way of highlighting inplace form elements? I need to do this for each form element that has an incorrect value entered (according to my validation). The controls I'm using in the grid are RadDatePicker, RadComboBox, RadTextBox and RadNumericBox.

Any help would be greatly appreciated.


Andy.
Tsvetina
Telerik team
 answered on 19 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?