Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views

Hello,
When i click on column header of the radcalendar it selects all the days of week for that month, ie. When i click on 'W' then it selects all the Wednesdays for that month. But what i want is when i click on 'W' then it should select all the Wednesdays for an entire date range (range i have set using rangemindate and rangemaxdate span across 10 months) after asking a confirmation

For this i have done the following

string day = "Wednesday"; // i am setting this value dynamically through client side OnColumnHeaderClick
for (DateTime date = rangeStart; date.CompareTo(rangeEnd) < 1; date = date.AddDays(1))
                {
                    if (day == Enum.GetName(typeof(DayOfWeek), date.DayOfWeek)) 
                    {
                        RadDate rd = new RadDate(date);
                        radCalendarAM.SelectedDates.Add(rd);
                    }
                }

This works perfectly when selecting dates. Now if i click on the same column header again i want to remove all the "wednesdays" for the entire date range. To remove i have done the following

DayOfWeek dow = (DayOfWeek)Enum.Parse(typeof(DayOfWeek), day);
                for (int i = 0; i < radCalendarAM.SelectedDates.Count; i++)
                {
                    RadDate date = (RadDate)radCalendarAM.SelectedDates[i];
                    if (date.Date.DayOfWeek == dow)
                    {
                        radCalendarAM.SelectedDates.RemoveAt(i);
                    }
                }

But this code does'nt remove all the Wednesdays in the date range, it leave behind alternate wednesdays (or which ever day) selected.
Can you advice on this?

-thanks



CJ
Top achievements
Rank 1
 answered on 16 Dec 2011
4 answers
389 views
Hi there,

I have been using the RadCalendar on my webpage.

RadControls for ASP.NET AJAX Q1 2011
version 2011.1.413.35
on a .net 3.5 website

Adding a selected date is easy enough:
        RadCalendar1.SelectedDates.Add(new RadDate(new DateTime(2011, 7, 28)));

Removing a previously added selected date gives an error, however:
        RadCalendar1.SelectedDates.Remove(new RadDate(new DateTime(2011, 7, 28)));
 
Error:
Cannot remove the specified item because it was not found in the specified Collection.
despite the fact that it was added.

Or if I do something like this, it Contains comes back as true, and then remove comes up with the same error.

if (RadCalendar1.SelectedDates.Contains(new RadDate((DateTime)item["CourseDate"]))) {
    RadCalendar1.SelectedDates.Remove(new RadDate((DateTime)item["CourseDate"]));
}

Any ideas?
CJ
Top achievements
Rank 1
 answered on 16 Dec 2011
10 answers
181 views
Hi,

When dragging selected rows from a radgrid, obviously you can see the rows being dragged about - I'd like to change this behaviour for an image to appear 'docked' to the mouse and that be dragged about instead.

Can anyone point me in the right direction please?

Thanks a lot,

Dan
Mira
Telerik team
 answered on 16 Dec 2011
1 answer
109 views
when i paste in the following content 
 <table>
            <tbody>
                <tr>
                    <td>
                    <h1 style="border-style: initial; border-color: initial;"><span style="font-size: 24px;">WELCOME TO&nbsp;<strong>DRAINMAN</strong></span></h1>
                    <h5 style="border-style: initial; border-color: initial; line-height: 10px;"><span style="font-size: 14px;">COVERING THE WHOLE OF NORTHERN IRELAND</span></h5>
                    <span style="font-family: arial, helvetica, sans; font-size: 11px;"></span>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 12px; text-align: justify;"><strong>Top Quality Drainage Services for&nbsp;<em>All of Northern Ireland</em></strong></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 12px; text-align: justify;"><strong></strong></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 12px; text-align: justify;"><strong>Fed up of blocked drains?</strong>&nbsp;Unsure of why you have drain clearing issues? Does tree root intrusion or off-grading affect drain clearance? Are those bad smells in your toilet or kitchen sink constantly give you a headache? Are grease and viscous substances clogging your drains?</p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 12px; text-align: justify;"><strong>Drainman</strong>&rsquo;s cutting-edge drainage services will put an end to all your woes.</p>
                    <ul style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px;">
                        <li style="border-style: initial; border-color: initial;">Our skilled drain unblocking services can cut through the toughest clogs in the shortest span of time.&nbsp;</li>
                        <li style="border-style: initial; border-color: initial;">We offer advanced CCTV camera drain inspections to identify the exact cause and location of your problem.</li>
                        <li style="border-style: initial; border-color: initial;">Our experienced technicians can handle the most complex drain repairs and replacement issues</li>
                        <li style="border-style: initial; border-color: initial;">Our advanced water jetting drain unblocking technology will rid your pipes of accumulations and deposits.</li>
                        <li style="border-style: initial; border-color: initial;">We can install grease traps to prevent a shutdown of your sewer system.</li>
                    </ul>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;"><a name="_GoBack" style="border-style: initial; border-color: initial;"></a></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;"><span style="font-size: 14px;">Inquire about our&nbsp;<strong>professional drainage services</strong>. Call Drainman for&nbsp;<strong>CCTV camera drain inspections, blocked drains, grease traps</strong>,&nbsp;<em>and</em>&nbsp;<strong>much more</strong>.</span></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;"><strong></strong></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;"><strong>Drainman&rsquo;s&nbsp;</strong>top notch drainage services are tailored to your specific needs, thus enhancing results. Our efficiency comes not only from solving all blocked drain problems but offering long term solutions. Our CCTV camera inspection offers an accurate drain survey, giving you a detailed assessment of your pipes and drains avoiding &nbsp;unpleasant surprises.</p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;">Blocked drains, broken pipes and poorly installed gutters can cause unhealthy backups and odours. We use the latest drain unblocking, repair and installation equipment to keep your drainage system clean and clear. More importantly, our stellar service is available to you at competitive prices.</p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;">Our quality trouble shooting skills, outstanding work and personalized attention has made us the drainage service of choice for homes, commercial establishments and industrial facilities in Belfast and throughout Northern Ireland.</p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;">No matter how complex your drainage system or concealed the blockage,&nbsp;<strong>Drainman</strong>&nbsp;has the expertise and the right tools for the job. Plus we offer 24/7 emergency drainage services for immediate drain clearing and repairs.&nbsp;<br />
                    <span style="text-align: left; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;"><br />
                    </span></p>
                    <p style="border-style: initial; border-color: initial; font-size: 12px; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; line-height: 18px; text-align: justify;"><span style="text-align: left; font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">Call Drainman or fill out our</span><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;</span><a href="http://drainman.wsiefusion.net/Contact-US" style="font-size: 14px; border-style: initial; border-color: initial;">online form</a><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;for</span><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;</span><strong style="font-size: 14px;">professional drainage services</strong><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;</span><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">in</span><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;</span><strong style="font-size: 14px;">Belfast&nbsp;</strong><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">and</span><span style="font-family: 'helvetica neue', 'lucida grande', helvetica, arial, verdana, sans-serif; font-size: 14px;">&nbsp;</span><strong style="font-size: 14px;">Northern Ireland.</strong></p>
                    </td>
                    <td style="padding-left: 25px; text-align: right; vertical-align: top;"><a href="/" id="touch"></a></td>
                </tr>
            </tbody>
        </table>
        </span></h1>
        <div>
        <div>
        <div id="_com_1" language="JavaScript"> </div>
        </div>
        </div>
        <p><a href="/" shape="rect"></a></p>
    </body>
</html>

it strips the tables I am using the .content element to save the html is this wrong ?
Rumen
Telerik team
 answered on 16 Dec 2011
1 answer
85 views
Hello! 
I want to show the folders and files of a remote station using fileexplorer control. I receive an object with all the information(folders)  and want to map it to the control. Is this possible?

thanks in advance
Dobromir
Telerik team
 answered on 16 Dec 2011
1 answer
112 views
I have an issue and I have been banging my head against the wall in solving this, This is some very basic stuff that is just not working for me. My Page Markup is as follows

<telerik:RadGrid ID="RadGrid1" runat="server" CssClass="RadGrid" GridLines="None"
    wallowpaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False"
    ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticUpdates="True"
    DataSourceID="SqlDataSource1" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
    OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender"
    CellSpacing="0" OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound">
    <PagerStyle Mode="Slider" />
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
    <AlternatingItemStyle />
    <MasterTableView CommandItemDisplay="Top" Name="Documents" AutoGenerateColumns="False"
        Width="100%" DataSourceID="SqlDataSource1" DataKeyNames="ID">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="ID" Name="Sections" DataSourceID="SqlDataSource2"
                runat="server">
                <%-- Sql DataSource 3 --%>
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="ID" Name="Requirements" DataSourceID="SqlDataSource3">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="DocumentSectionID" MasterKeyField="ID" />
                        </ParentTableRelation>
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID"
                                Visible="false" FilterControlAltText="Filter Name column">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DocNameReqID" SortExpression="DocNameReqID" FilterControlAltText="Filter Text column"
                                HeaderText="ID" UniqueName="DocNameReqID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Category" SortExpression="Category" FilterControlAltText="Filter Text column"
                                HeaderText="Category" UniqueName="Category">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Text" SortExpression="Text" FilterControlAltText="Filter Text column"
                                HeaderText="Text" UniqueName="Text">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Highlight" HeaderText="Highlight" SortExpression="Highlight"
                                UniqueName="Highlight" Visible="false" FilterControlAltText="Filter Highlight column">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Keyword" SortExpression="Keyword" FilterControlAltText="Filter Text column"
                                HeaderText="Keyword" UniqueName="Keyword">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn>
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnEdit" runat="server" CommandName="EditRecord" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                                        AlternateText="Edit" ImageUrl="~/Images/edit.gif" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                UniqueName="ID">
                                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            </telerik:GridButtonColumn>
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <%-- Sql DataSource 3 --%>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="DocumentID" MasterKeyField="ID" />
                </ParentTableRelation>
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID"
                        Visible="false" FilterControlAltText="Filter Name column">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn DataTextField="Name" HeaderText="Name" CommandName="RequirementLink"
                        ButtonType="LinkButton">
                    </telerik:GridButtonColumn>
                    <telerik:GridBoundColumn DataField="Text" SortExpression="Text" FilterControlAltText="Filter Text column"
                        HeaderText="Req Description" UniqueName="Text">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PageNo" SortExpression="PageNo" FilterControlAltText="Filter Text column"
                        HeaderText="Page" UniqueName="Text">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="ID">
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
                </Columns>
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="ID"></telerik:GridSortExpression>
                </SortExpressions>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID"
                Visible="true" FilterControlAltText="Filter Name column">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FileName" SortExpression="FileName" FilterControlAltText="Filter FileName column"
                HeaderText="File Name" UniqueName="FileName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DocFormat" FilterControlAltText="Filter DocFormat column"
                HeaderText="Format" SortExpression="DocFormat" UniqueName="DocFormat">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Size" FilterControlAltText="Filter Size column"
                HeaderText="Size (KB)" SortExpression="Size" UniqueName="Size" DataType="System.Double">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TimeStamp" DataType="System.DateTime" FilterControlAltText="Filter TimeStamp column"
                HeaderText="Time Stamp" SortExpression="TimeStamp" UniqueName="TimeStamp">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ParsedTime" DataType="System.DateTime" FilterControlAltText="Filter ParsedTime column"
                HeaderText="Parsed Time" SortExpression="ParsedTime" UniqueName="ParsedTime">
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column">
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Download" Text="Download"
                ImageUrl="~/Images/download.png">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                UniqueName="ID">
                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings UserControlName="EmployeeDetailsCS.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_WebBlue">
    </HeaderContextMenu>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DocumentParsingConnectionString %>"
    SelectCommand="SELECT [ID],[Name], [FileName], [DocType], [DocFormat], [DocRefNo], [Title], [Size], [Version], [TimeStamp],[ParsedTime] FROM [Documents]"
    UpdateCommand="UPDATE [Documents] SET [Name] = @Name WHERE [ID]=@ID" DeleteCommand="DELETE FROM [Documents] WHERE [ID] = @ID"
    OldValuesParameterFormatString="original_{0}" ConflictDetection="OverwriteChanges">
    <UpdateParameters>
        <asp:Parameter Name="Name" Type="String" />
        <asp:Parameter Name="original_ID" Type="Int64" />
        <asp:Parameter Name="original_Name" Type="String" />
    </UpdateParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int64" />
    </DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DocumentParsingConnectionString %>"
    SelectCommand="SELECT [ID],[PageNo],[Name],SUBSTRING ([Text], 0 , 255 ) AS [Text] FROM [DocumentSections] WHERE DocumentID=@DocumentID"
    DeleteCommand="DELETE FROM [DocumentSections] WHERE [ID] = @ID">
    <SelectParameters>
        <asp:SessionParameter SessionField="DocumentID" Name="DocumentID" Type="Int64" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int64" />
    </DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DocumentParsingConnectionString %>"
    SelectCommand="SELECT [DocumentSections].[Name] + CONVERT(varchar(250), ROW_NUMBER() OVER (ORDER BY [Requirements].[ID])) AS DocNameReqID, [DocumentSections].[DocumentID] AS [DocumentID], [DocumentSections].[Name] AS [DocumentSectionName], [Requirements].[ID],[Requirements].[Category],[Requirements].[Text], [Requirements].[Keyword], [Requirements].[Highlight] FROM [Requirements] INNER JOIN [DocumentSections] ON [Requirements].[DocumentSectionID] = [DocumentSections].[ID] WHERE [Requirements].[DocumentSectionID]=@DocumentSectionID"
    DeleteCommand="DELETE FROM [Requirements] WHERE [ID] = @ID">
    <SelectParameters>
        <asp:SessionParameter SessionField="DocumentSectionID" Name="DocumentSectionID" Type="Int64" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int64" />
    </DeleteParameters>
</asp:SqlDataSource>

Now I have created the following user control by looking at the demos page

<table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
    <tr>
        <td>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
            Name:
        </td>
        <td>
            <asp:HiddenField ID="hfID" runat="server" Value='<%# DataBinder.Eval( Container, "DataItem.Name" ) %>'></asp:HiddenField>
            <asp:TextBox ID="TextBox7" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Name" ) %>'>
            </asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            FileName:
        </td>
        <td>
            <asp:TextBox ID="TextBox8" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.FileName") %>'
                TabIndex="1">
            </asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            DocType:
        </td>
        <td>
            <asp:TextBox ID="TextBox9" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.DocType") %>'
                TabIndex="2">
            </asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            DocFormat:
        </td>
        <td>
            <asp:TextBox ID="TextBox5" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.DocFormat") %>'
                TabIndex="2">
            </asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            DocRefNo:
        </td>
        <td>
            <asp:TextBox ID="TextBox10" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.DocRefNo") %>'
                TabIndex="2">
            </asp:TextBox>
        </td>
    </tr>
    <tr>
        <td align="right" colspan="2">
            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update"
                Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'
                onclick="btnUpdate_Click">
            </asp:Button>
            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
                Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:Button>
              
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>

My problem is with the SQLDataSource Update command.... the ID passes by just fine but all the other values go in as NULL... I have confirmed this by running the profiler.

SQL PROFILER
"exec sp_executesql N'UPDATE [Documents] SET [Name] = @Name WHERE [ID]=@ID',N'@Name nvarchar(4000),@original_ID bigint,@original_Name nvarchar(4000)',@Name=NULL,@original_ID=179,@original_Name=NULL"

This is not worked for me at all from very beginning and I am very frustrated by this. Can any body help me with this. Thanks

Junaid Mufti
Synistosa Technologies
http://synistosa.com
Antonio Stoilkov
Telerik team
 answered on 16 Dec 2011
1 answer
72 views
Hi

Currently the compact button popup will be centered on the screen.
Is there any possibility to show the popup bellow the button?

Cheers,
Jani
Marin Bratanov
Telerik team
 answered on 16 Dec 2011
1 answer
98 views

Hello!

I have inherited an asp.net project that relies heavily on the Telerik library.  In the current application, there are two menu items that when clicked generate a redirect to the same asp page, but with different arguments:
~\myasppage.aspx?Mode="A"&Type="B";
~\myasppage.aspx?Mode="C"&Type="D";

So I have been asked to replace them with a dialog box that allows the user to choose the Mode and type, then opening the page.  In looking at the Telerik controls that are available to me, it seems that the RadWindow is perfect.  My strategy is:
redirect to the generic page:
~\myasppage.aspx
Define a RadWindow on the page and sets its VisibleOnPageLoad to true.

The RadWindows contains a Cancel button and a Next button.  Selection of the cancel button closes the dialog and leaves an empty page.  Selection of the Next button will redirect to the same page but contain the Mode and Type parameters using the
 window.location = myasppage.aspx?Mode="whatever"&Type="whatever";

My problem is that because VisibleOnPageLoad=true the radwindow always opens so  I can't load the real page! 

Am I going about this correctly? Is there another control to deal with this? 

I was thinking that I could set VisibleOnPageLoad to false, then check for my parameters in the OnPreInit method to decide if I should show the radwindow. 

I haven't been able to figure out how to call a javascript function (to show the radwindow) from the code behind, and even if I could, I'm not sure that the javascript would even be loaded yet!

Is there a better way of doing this?  Will this even work?

thanks

Marin Bratanov
Telerik team
 answered on 16 Dec 2011
1 answer
77 views
This must be my week for strange problems.  Actually, I'm upgrading half a million lines of code from ASP.NET 2.0 to 4.0, and taking my telerik from 2009 Q3 to 2011 Q3, so I've got to catch up on 2 - 5 years of advancements.

Anyway, I'm seeing some strageness in RadInput.  I'm trying to add a specific default button for the enter key. Simple enough, right?  Handle the keypress and act on keyCode 13.

I've found through testing though, that when you have MaxLength defined on the field, characters don't seem to be accepted.  The enter key still works fine, but nothing shows up in the field.

Here's what I did:
s = string.Empty;
s += "function " + this.ClientID + "_defaultEnter(sender, eventArgs) { \r\n";
s += "  var c = eventArgs.get_keyCode(); \r\n";
s += "  var btn = document.getElementById('" + btnSearch.ClientID + "'); \r\n";
s += "  if (c == 13){ \r\n";
s += "    btn.click(); \r\n";
s += "    eventArgs.set_cancel(true); \r\n";
s += "  } \r\n";
s += "}\r\n";
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), this.ClientID + "_defaultEnter", s, true);
fldCaseNumber.ClientEvents.OnKeyPress = this.ClientID + "_defaultEnter";

And yes, I know (now) that strings are immutable and I should be using a StringBuilder instead of += ... let's stick to the topic, eh? :)

Anyway, I can live without the MaxLength, I just wanted to share the pain and maybe help someone who can't figure out why their keyboard suddenly stopped working on that textbox.

-Chris
Vasil
Telerik team
 answered on 16 Dec 2011
1 answer
112 views
Hi,

I downloaded the trial version of ASP.NET Ajax controls and I tried explore the RadAsyncUpload control.

I am bit confused about the look and feel of the RadAsyncUpload and RadUpload control.

When I used RadAsyncUpload control, I don't know to display the Add, delete buttons to this control
(Not finding the ControlObjectsVisibility Preoperty) .
But in the online help document I can see the Add and delete buttons for the RadAsyncUpload   control in this link.

My requirement is to get the same look and feel of RadUpload control for RadAsyncUpload control and as well as validate the file size at client side.

Please help me to solve the above issue?

Thanks
Prabhakar
Bozhidar
Telerik team
 answered on 16 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?