Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
145 views
In our application we are using radgrid where we are going to select  three things like a,b,c from combo box where 'b' depends on 'a' and 'c' depends on 'b' (selected change event of combobox) after clicking on add it should add to grid but not to database. And i should be able to delete, edit rows.When i Save my page then all the rows should be read and stored in the table.
Sunil
Top achievements
Rank 1
 answered on 16 Feb 2011
1 answer
90 views

Hi

How can I restrict the user to select only a docx file for upload and to catch it if it’s not?

Thanks

Regards

Shinu
Top achievements
Rank 2
 answered on 16 Feb 2011
3 answers
118 views
Hello,

Often I have a form that has these values:

RadTextBox
RadNumericTextBox
RadDatePicker
RadComboBox
RadMaskedTextBox

I often use a CustomValidator control to validate the form to ensure at least one value has been provided in the form.  Rather than write code to check each an every control to see if it has a value, is there one JQuery condition I can write to check to see if any of the controls have a value?  I tried using a CSS class to identify each control, and then target that control by doing something like:

$("#wrapper").find(".TelerikControl[value != null && value != '']").length > 0

To determine if there is any value present, but this doesn't quite work.  Can anyone share if they did this and how?

Thanks.
Maria Ilieva
Telerik team
 answered on 16 Feb 2011
1 answer
64 views
I have hooked into OnClientNodeDragStart to remove the event hookup of a  jQuery Tools Tooltip, but it appears there is no client side event that I can hook in to to add these events back if I don't complete the Drag/Drop or decide that I want to cancel and drop the item onto its self.

This removes the jQuery functionality, but if I cancel the drag, i'm not sure there is an event that will wire it back up...

function ClientNodeDragStart(sender, eventArgs) {
        $(".someTrigger,.someOtherTrigger").each(function () {
            $(this).original_show = $(this).data("tooltip").show;
            $(this).data("tooltip").show = function () { };
        });
    }

Nikolay Tsenkov
Telerik team
 answered on 16 Feb 2011
2 answers
107 views
hi i tried retriving the gridboundcolumn values as below
foreach (GridDataItem item in RadGrid1.EditItems)
                    {
                        str = "";
                        if (item["Users"].Text != null)
                        {
                            strID = item["ID"].Text;
                            StrLicenseType = item["AppliedFor"].Text;
                            UnderLicenseeID = item["UnderLi"].Text;
                            msg = item["LiName"].Text;
                            RadGrid2.Visible = false;
                        }
and i am getting &nbsp as the value is there any other alternative ??
abinav
Top achievements
Rank 1
 answered on 16 Feb 2011
1 answer
82 views
When using the new feature mentioned: here (Slot Selection), I've encountered the following bug. 
I've defined a context menu inside my schedule control as follows:

<TimeSlotContextMenus>
    <tel:RadSchedulerContextMenu ID="TimeSlotContextMenu" runat="server" >
        <Items>
            <tel:RadMenuItem Text="Assign Employee" Value="NoClick" />
        </Items>
    </tel:RadSchedulerContextMenu>
</TimeSlotContextMenus>

Then server side I dynamically add child menu items to this root item: 

private void CreateTimeSlotMenu() {
    RadMenuItem menu = TimeSlotContextMenu.Items.FindItemByText("Assign Employee");
    menu.Items.Clear();
    DataTable dtValidEmps = DAL.GetEmployeesForCalendar(_accountID, _locationID);
    foreach (DataRow dr in dtValidEmps.Rows) {
        menu.Items.Add(new RadMenuItem() {Text = (string)dr["EmployeeName"], Value = string.Format("AssignEmp{0}",dr["EmployeeID"])});
    }
}

I attach to the TimeSlotContextMenuItemClickedEventHandler event server side, and when I get the TimeSlot object from the TimeSlotContextMenuItemClickedEventArgs it doesn't contain the full duration of the selected timeslot, instead its just the block of time like 9-9:30.

I am doing something wrong here?  How do I get the full duration of the selected time slice, on the server side?

I created a support ticket for this as well, but wanted to see if anyone else has experienced this.
Nikolay Tsenkov
Telerik team
 answered on 16 Feb 2011
3 answers
86 views
Currently I have a page which contains a RadGrid (with subgrid), RadToolTipManager, and RadAjaxManager. I have a GridHyperLinkColumn which I selectively disable the URL of in the code behind. When the URL is disabled I add a tool tip by adding the columns ID to the RadToolTipManager TargetControls collection. 

The RadAjaxManager has the Grid set to update the itself as well as the RadToolTipManager. 

I'm able to use the various paging and sorting controls and still have the tooltip appear where it should. As soon as I expand a sub-grid is where I'm running into a problem. The tooltip that appeared just before the sub-grid request will no longer appear for the same cell. 

One thing I did notice is that before the sub-grid request the TD element had an ID while after the request the ID was gone. I'm guessing that since the ID of the element is gone the RadToolTipManager is not able to tooltipify the cells since its not technically part of its TargetControls collection.

Any idea as to why the TD element loses it ID during the AJAX postback?

I'm working on a project to attach to this. I'll hopefully be able to demonstrate this issue.
Maria Ilieva
Telerik team
 answered on 16 Feb 2011
1 answer
111 views

hi, 

I have Grid with 1 DetailTable, and there are static columns with GridButtonColumns, clicking which should open new page with  parameter.

The call to popup page is in code behind:

if (e.CommandName == "History")
                {
                    popupScript = "<script language='javascript'>" +
                                    "window.open('History.aspx?code=" + codeStr + "'," +
                                    "'_blank', 'scrollbars=yes, resizable=yes,status=yes," +
                                    "location=yes, toolbar=yes, menubar=yes,top = 0, left = 0, target='_self')" +
                                    "</script>";
  
                    ClientScript.RegisterStartupScript(cstype, "History", popupScript);
                    //Page.RegisterStartupScript("???????", popupScript);
                }

In debug mode, I put breakpoint in - ClientScript.RegisterStartupScript(cstype,"History", popupScript);

It reaches there, but the page is not poped up. What I am doing wrong ?

Here is aspx code:

<div>
       <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
       </telerik:RadScriptManager>
       <!-- content start -->
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RBL_UType">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="panelTest_DIV" />
                       <telerik:AjaxUpdatedControl ControlID="RadSplitter1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="RBtn_Search">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadSplitter1" LoadingPanelID="RadAjaxLoadingPanel1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="RG_SearchResult">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RG_SearchResult" LoadingPanelID="RadAjaxLoadingPanel1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManager>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
       </telerik:RadAjaxLoadingPanel>
       <!-- content end -->
       <asp:RadioButtonList ID="RBL_UType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
           AutoPostBack="True">
           <asp:ListItem Value="0">??????????</asp:ListItem>
           <asp:ListItem Value="1">???????????</asp:ListItem>
       </asp:RadioButtonList>
       <br />
       <div id="panelTest_DIV" title="?????? ?? ???????? ??? ???" runat="server">
           <asp:Panel ID="panelTest" runat="server">
               <table>
                   <tr>
                       <td>
                           <asp:Label ID="LBL_Surname" runat="server" Text="???????:" Visible="false"></asp:Label>
                       </td>
                       <td>
                           <asp:TextBox ID="TB_Surname" runat="server" Visible="false"></asp:TextBox>
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:Label ID="LBL_Name" runat="server" Text="???:" Visible="false"></asp:Label>
                       </td>
                       <td>
                           <asp:TextBox ID="TB_Name" runat="server" Visible="false"></asp:TextBox>
                       </td>
                   </tr>
                   <tr>
                       <td>
                       </td>
                       <td>
                           <telerik:RadButton runat="server" ID="RBtn_Search" OnClick="RB_Search_Click" Text="?????"
                               Visible="false" Skin="Telerik">
                           </telerik:RadButton>
                       </td>
                   </tr>
               </table>
           </asp:Panel>
       </div>
       <br />
       <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" 
               Style="margin-top: 0px" Height="100%">
           <telerik:RadPane ID="RadPane1" runat="server" Width="100%" Visible="false">
               <telerik:RadGrid ID="RG_SearchResult" runat="server" OnItemDataBound="RG_SearchResult_ItemDataBound"
                   OnNeedDataSource="RG_SearchResult_NeedDataSource" OnDetailTableDataBind="RG_SearchResult_DetailTableDataBind"
                   OnItemCommand="RG_SearchResult_ItemCommand" DataSourcePersistenceMode="NoPersistence"
                   HeaderStyle-Font-Bold="true" Width="100%" PageSize="1000" PagerStyle-AlwaysVisible="true"
                   ShowStatusBar="True" Visible="false" AllowPaging="false" Skin="Telerik">
                   <MasterTableView Name="Level1" DataKeyNames="ID">
                       <Columns>
                           <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false" />
                       </Columns>
                       <DetailTables>
                           <telerik:GridTableView Name="Level2" DataKeyNames="ID" HierarchyLoadMode="ServerOnDemand"
                               Width="100%" BackColor="#EFEFFB">
                               <Columns>
                                   <telerik:GridButtonColumn CommandName="RollInfo" Text="???????" UniqueName="RollInfo" />
                                   <telerik:GridButtonColumn CommandName="History" Text="???????" UniqueName="History" />
                                   <telerik:GridButtonColumn CommandName="TechSpec" Text="???. ?????????" UniqueName="TechSpec" />
                                   <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false" />
                                   <telerik:GridBoundColumn DataField="PropCode" HeaderText="???" UniqueName="PropCode" />
                                   <telerik:GridBoundColumn DataField="PropAddr" HeaderText="?????" UniqueName="PropAddr" />
                                   <telerik:GridBoundColumn DataField="Owner" HeaderText="???" UniqueName="Owner" />
                               </Columns>
                               <PagerStyle AlwaysVisible="True"></PagerStyle>
                           </telerik:GridTableView>
                       </DetailTables>
                       <ExpandCollapseColumn Visible="True">
                       </ExpandCollapseColumn>
                       <PagerStyle AlwaysVisible="True"></PagerStyle>
                   </MasterTableView><HeaderStyle Font-Bold="True"></HeaderStyle>
                   <PagerStyle AlwaysVisible="True"></PagerStyle>
               </telerik:RadGrid></telerik:RadPane>
       </telerik:RadSplitter>
   </div>
 

Veli
Telerik team
 answered on 16 Feb 2011
1 answer
178 views
I am using RadCaptcha in simple asp user control. It is working fine in normal conditions but stop working when accessed through url rewrtten address. Can you please suggest what is required to fix this problem. I am using asp.net 4.0 on iis7. I cannot find any appropriate property to fix this. Furthermore, I am not using web config to write rules, instead my rules are saved in database and urls are being handled using resolveurl.

Following is a code used in Global.asax to give you an idea of the way I am implementing url rewriting.
void Application_BeginRequest(object sender, EventArgs e)
 {
// URLRewrtingEnabled
     string ue = "";
     try
     {
         ue = System.Configuration.ConfigurationManager.AppSettings["URLRewrtingEnabled"].ToString();
     }
     catch (Exception ex)
     {
         ue = "";
     }
     if (ue.ToLower() == "true")
     {
         string fullOrigionalpath = Request.Url.ToString();
         DataAccessLayer Dal = new DataAccessLayer();
         Activity act = new Activity();
         string st, sv, sn, dp, sn2;
         st = Dal.GetDefautURL(); // Site name
         sn = Request.ServerVariables["SERVER_NAME"].ToString(); // Server name
         string ds = Dal.getDestinationURL(sn, st, fullOrigionalpath);
         if (ds != "")
         {
             try
             {
                 Context.RewritePath(ds);
             }
             catch (Exception ex)
             {
                 Dal.ErrorLog(ex.Message, "URL Rewrite");
             }
         }
     }
Pero
Telerik team
 answered on 16 Feb 2011
3 answers
135 views
I've hit a dilemma that I hope has an obvious answer that I've overlooked.

I am creating a radgrid completely in the code-behind (page_init) and adding it to a place-holding panel in my page.  Since I want to do advance databinding and will need to handle the NeedDataSource event, I expected to then create a handler for it in the code-behind as well.

Since the control isn't in the .aspx page, there is no object reference for it during the design-time programming of the code-behind and I get compilation errors for a function that says it is handling an event for a control that doesn't yet exist.

Is there a way around or through this problem?

Mike
Nikolay Rusev
Telerik team
 answered on 16 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?