Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
90 views
Hi All,

Question is based on example provide here http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/filteringdetailtables/defaultcs.aspx

Scenario:
Step 1. Under column OrderId add search for user  "Alejandra Camino" for e.g. 10281, filter works fine and now you can see order details with orderId 10281.
Step 2. Now expand details for user "Alexander Feuer" you would notice column OrderId is pre-filled with search criteria that was used on step 1 which should not be the case (but the filter is not applied for this user which is good.)
Step 3. Lets enter search criteria for user "Alexander Feuer" under orderId for e.g. 10277, filter works. Now collapse details for user "Alejandra Camino" and expand the same row and orderId will display search text as 10277, but will display filtered records that was performed on Step 1 i.e. records for 10281.

Problem:
This is the same behavior that is happening on grid view I have integrated, please help to resolve this issue and an example on how to load information properly without overwriting search criteria for each row in DetailTable and still have a functional filter.


Regards,

J
Vasil
Telerik team
 answered on 08 Feb 2012
4 answers
405 views
Hai,

    I am creating a asp repeater for displaying images dynamically. The asp Repeater is created from server side. I have used asp image for displaying the image in the repeater. Now i have to show the tooltip for each image. The tooltip contains that same image in LargeSize. I created the repeater dynamically.
                                     Also dynamically add the image control in repeater. I used the Itemtemplate for add the  asp image control. Now i have to show the tooltip  for each image dynamically. How can i add this tooltip fro this images, which is added in template.

I added the code below.
protected Repeater ImageRepeater;     
  
  
    ImageRepeater.ItemTemplate = new ImageTemplate();
            ImageRepeater.DataSource = ImageTable;
            ImageRepeater.DataBind();
  
  
class ImageTemplate : ITemplate
    {
        Image ToolImg ;
        RadToolTip ImgToolTip; 
 
        public ImageTemplate()
        { }
    
        public void InstantiateIn(System.Web.UI.Control container)
        {
            Image Img = new Image ();
            ToolImg = new Image ();
 
            Img.DataBinding += new EventHandler(Img_DataBinding);
  
            LiteralControl StartDiv = new LiteralControl("<div style=\"float: left; padding-left:10px;\">");
            container.Controls.Add(StartDiv);
            container.Controls.Add(Img);
 
          ImgToolTip = new RadToolTip();
          
            ImgToolTip.Width = Unit.Pixel(300);
            ImgToolTip.Height = Unit.Pixel(300);
           ImgToolTip.TargetControlID= Img.ClientID;
           ImgToolTip.IsClientID = true;
           ImgToolTip.Controls.Add(ToolImg);
 
           container.Controls.Add(ImgToolTip);
  
            LiteralControl EndDiv = new LiteralControl("</div>");
            container.Controls.Add(EndDiv);
        }
  
        void Img_DataBinding(object sender, EventArgs e)
        {
            Image Img;
            Img = (Image )sender;
            RepeaterItem container = (RepeaterItem)Img.NamingContainer;
            Img.ImageUrl = "/_layouts/images/jobsarathyDemo/TempImages/"+DataBinder.Eval(container.DataItem, "ImageName").ToString();
 
             ToolImg.ImageURL = "/_layouts/images/jobsarathyDemo/TempImages/" + DataBinder.Eval(container.DataItem, "ImageName").ToString();
        }
    }

But it is not working.

Thanks
Velkumar.
Marin Bratanov
Telerik team
 answered on 08 Feb 2012
2 answers
250 views
We're looking to implement the RadToolbar as a primary UI Interface, and everything works great save for the fact that we sometimes have Drop Down menu items that need submenus.  We know you can't have a RadToolBarDropDown as a button within a RadToolBarDropDown, so that's out, and while we can get that type of functionality with the RadMenu, we then lose the ability to specify validation and validation groups on individual buttons in the toolbar.  We've tried using a RadToolBarButton with an ItemTemplate containing a RadMenu, but our problem with that is that it places the radMenu in a outlined box, so it loses the look of the other tool bar buttons.

Essentially, Is there a way to accomplish this in one of the following ways:

a) use a RadMenu in a RadToolbarButton ItemTemplate, but lose the outline styling around it and instead have it appear like any other toolbar button?

b) Use the RadToolBarDropDown button but have it pop up a menu (maybe a RadContextMenu?) instead of it's normal drop down in the same location that would have appeared?


Were open to other suggestions as well.

Thanks
Max
Top achievements
Rank 1
 answered on 08 Feb 2012
1 answer
160 views
Hi,

I need to add our own sorting to tree list.

Is it possible?

I need to sort the tree list value by alphabetical order.

i need to show the alphabetical letters(a to z).with link.

when the user click the a button, it sort the tree list with starting letter of a values.

Is there any way to achieve this?

Thanks,
Uma
Tsvetina
Telerik team
 answered on 08 Feb 2012
0 answers
33 views
HI

this is my grid tag
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false">
                          <ClientSettings>
                              <Selecting AllowRowSelect="true" />
                          </ClientSettings>
                          <MasterTableView>
                              <Columns>
                                  <telerik:GridBoundColumn DataField="ID" HeaderText="شماره" UniqueName="ID">
                                  </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn DataField="GeneralDate"
                                      HeaderStyle-Font-Names="Tahoma" HeaderText="تاریخ"
                                      ItemStyle-Font-Names="Tahoma" DataFormatString="{0:yyyy/MM/dd}">
                                  </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn DataField="time" HeaderStyle-Font-Names="Tahoma"
                                      HeaderText="ساعت" ItemStyle-Font-Names="Tahoma" UniqueName="time" >
                                  </telerik:GridBoundColumn>                                   
                              </Columns>
                          </MasterTableView>
                      </telerik:RadGrid>


and this is my function that bind my grid on client side:
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
           tableView.set_dataSource(result);
           tableView.dataBind();

after data bind the time colum show [object Object] for every rows?
why? and how can i solve this problem ?

Best regards,
mohammad
Mohammad sadegh
Top achievements
Rank 1
 asked on 08 Feb 2012
9 answers
133 views
I have an app in which I use a tabcontainer control of the microsoft ajax control tool kit. And I just realized, after mush time spent trying to make it work, that it does not work at all inside a tab of the tabcontainer control.

Anybody knows any work around?

<

 

cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">

 

<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Photos Grouped in Frames">

 

<HeaderTemplate>
Grouped in Frames

 

 

</HeaderTemplate>

 

 

 

<ContentTemplate>

 

 

 

<telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="ObjectDataSource2">

 

<ItemTemplate>

 

 

<asp:Image ID="Image1" ImageUrl='<%#"~/" + eval("imageurl") %>' runat="server" />

 

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadRotator>

 

<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetFramePhotos" TypeName="MB.TheBeerHouse.BLL.Albums.Photo">  

 

 

<SelectParameters>

 

 

 

 

 

<asp:ControlParameter ControlID="FrameIODTag" DefaultValue="" Name="FrameID" PropertyName="Value" Type="Int32" />

 

 

 

</SelectParameters>

 

 

 

</asp:ObjectDataSource>

 

 

 

 

</

ContentTemplate>

 

 

</cc1:TabPanel 

 

 

<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Loose Photos">

 

 

</cc1:TabPanel>

 

 

<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Loose Photos">

 

 

 

<ContentTemplate>

 

 

 

</ContentTemplate>

 

 

 

 

</cc1:TabPanel>

 

 

 

 

 

 

</cc1:TabContainer>

this does not work. It will occupy the spacce on screen but will not display any picture or data at all.

 

 

 

 

Nebras
Top achievements
Rank 1
 answered on 08 Feb 2012
8 answers
622 views
Hi,

On radmaskedtextbox, I noticed that after setting the mask as Phone Number, it accepts numeric entries of 9 or less and won't throw that as an error, even though it's not a valid phone number length. Is there a way to set this on the control's properties? Or should I have to use a regular expression validator to achieve this? And also have the error message appear inside the radmaskedtext box like radinputmager does? (see 2nd scenario)

        <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" Runat="server"
            DisplayMask="(###) ###-####" Mask="(###) ###-####"
            ValidationGroup="vgTest" ZeroPadNumericRanges="False"
            AllowEmptyEnumerations="False" DisplayPromptChar="#" RoundNumericRanges="False"
            Width="125px" NumericRangeAlign="Left">

Another way I tried is to create a radinputmanager and set regular expression to phone number, this will validate on single numeric entries and we like the dynamic error messages appearing inside the textbox, however, the problem with this is we don't want the users to enter the ()- characters and we only want to grab the numeric entries to store in the database.

            <telerik:RegExpTextBoxSetting BehaviorID="Phone" ErrorMessage="Invalid Phone" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" Validation-ValidateOnEvent="Submit" Validation-IsRequired="true" Validation-ValidationGroup="vgTest">
                <TargetControls>
                    <telerik:TargetInput ControlID="txtPhone" />
                </TargetControls>

Let me know which approach would achieve this. Sample codes appreciated. Thanks.
Shif
Top achievements
Rank 1
 answered on 08 Feb 2012
1 answer
112 views
I'm working on a project where they want us to prevent any of the users from pasting into the RadEditor, and I was able to get it working in IE and Firefox (finally), but Chrome just lets me paste right into the box and I cant seem to make it stop. The JavaScript I am using to prevent Pasting is as follows.

<script type="text/javascript" language="javascript">
 
    // Prevents pasting into RadEditor
    // from RadEditor menu and Context menu
    function OnClientCommandExecuting(editor, args) {
 
        var commandName = args.get_commandName();
 
        if (commandName == "PasteFromWord"
        || commandName == "PasteFromWordNoFontsNoSizes"
        || commandName == "PastePlainText"
        || commandName == "PasteAsHtml"
        || commandName == "Paste") {
 
            args.set_cancel(true);
        }
        //alert(commandName);
    }
 
    // Prevents pasting into RadEditor
    // by pressing Ctrl + V
    function OnClientLoad(editor) {
 
        editor.attachEventHandler("onkeydown", function (e) {
 
            if (e.ctrlKey && e.keyCode == 86) {
 
                if (document.all) {
                    e.cancelbubble = true;
                    e.returnvalue = false;
                    return false;
                }
                else {
                    e.preventdefault();
                    return false;
                }
            }
 
        });
 
        // Prevents Firefox from loading the context menu.
        editor.attachEventHandler("oncontextmenu", function (e) {
            if (e.preventDefault) e.preventDefault();
            if (e.stopPropagation) e.stopPropagation();
            return false;
        });
    
</script>
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
200 views
Hi

I'm new to the scheduler and I can't figure out what the RecurrenceParentID is? Then as long as I'm starting a thread, if anyone could explain an eloquent way of calendar filtering. I guess telerik calls it 'Resources'. Basically I want to adapt one the teleril examples where you could see the calendar for different people or all at the same time. I would like to have three check boxes to the side of my calendar that if the the box is checked those calendar appointments will show. Anyone know a good way about accomplishing this?

Thanks

Mike
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
64 views
Hello. I need to select the row index of the grid by using javascriptfunction .. first get the index of selected then select the next. sorry for bad english .. Help? 
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?