Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views
Hi, I am using the Menu component, and trying to use individual 'sprites' for each menu item
The items are created dynamically from data from a database, and each is assigned an image file to its ImageUrl property.
The images consist of the image in 2 states, horizontally in the file - the normal image and a highlight image.

When the menu is displayed, it shrinks the entire image to fit the 24px size, rather than trimming it.
My CSS is shown below.

.RadMenu img.rmLeftImage
{
  width: 24px;
  height: 24px;
  margin: 1px 2px 0 -3px;
  padding-bottom: 3px;
  background-position: -2px 0;
  background-repeat: no-repeat;
}

Is there a way to:
1. Trim the image instead of resizing it.
2. Change the source position so that the highlight image is shown on rollover.

Thankyou.

Paul
Kamen Bundev
Telerik team
 answered on 15 Sep 2010
7 answers
649 views
Hello,

I want to popup confirmation dialog to the user to update the record in the telerik grid. I have the editform mode of editing the record.
How can I add javascript for it?

Can anyone help me out on this issue.

<MasterTableView CommandItemDisplay="Top" DataKeyNames="brandid"
    EditMode="EditForms" AutoGenerateColumns="False" Width="100%">
    <CommandItemTemplate>
    <div style="padding:10px 0px;">
       <asp:LinkButton ID="btnUpdateEdited" runat="server"                    
             CommandName="UpdateEdited"
              Visible='<%# gridBrands.EditIndexes.Count > 0 %>'>
          <img style="border:0px;vertical-align:middle;" alt=""
               src="../Images/Update.gif" /> Update Record
           </asp:LinkButton
    </div>
     </CommandItemTemplate>
     <Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton"
           EditImageUrl="~/images/Edit.gif" UniqueName="EditCommandColumn">
        <ItemStyle CssClass="MyImageButton" />
    </telerik:GridEditCommandColumn>
     </Columns>
</MasterTableView>
Tsvetina
Telerik team
 answered on 15 Sep 2010
6 answers
204 views
Hi Telerik Team,

I have a custom class that inherits from GridBoundColumn

I have overridden SetupFilterControls  method and  I am able to have a dropdown and able to bind value to the dropdown.

The dropdown contains username as textfield and UserID as value field.

Also I am able to fire the SelectedIndexChanged event - The code on the selected Indexed event is as follows

 

GridFilteringItem filterItem = (sender as RadComboBox).NamingContainer as GridFilteringItem;

 

 

RadComboBox ddList = filterItem["ResourceNames"].Controls[0] as RadComboBox;

 

 

if (ddList.SelectedValue == "All")

 

filterItem.FireCommandEvent(

"Filter", new Pair(GridKnownFunction.NoFilter.ToString(), this.UniqueName));

 

 

else

 

filterItem.FireCommandEvent(

"Filter", new Pair(GridKnownFunction.EqualTo.ToString(), this.UniqueName));

 


The command on the else part of the above thing is fired when I select a user name from the dropdown.
then  the code where the grid set to the datasource is executed

MyGrid.DataSource = BusinessLayer.GetAllTasks(projID)

However no rows on the grid are returned. it returns 0 rows.

How to make this work?

I am planning to rebind the grid by ensuring the filtered value is passed. How can I ensure that the value I selected on the dropdown is passed to GetAllTasks(ProjID) method so that I can manually filter the result set.









Kalyan
Top achievements
Rank 1
 answered on 15 Sep 2010
1 answer
69 views

Hi guys,

It looks like you have the bug in the latest RadEditor for ASP.NET AJAX controls library.

Please check it and provide a workaround.

Environment: Internet Explorer 8

Scenario to reproduce:
1. Navigate to http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx;
2. Switch New Lines as radio button to Paragraphs value;
3. Switch to the HTML Mode and fill in the following HTML:
<a href="http://www.test.com/">www.test.com (Test link)</a>

4. Switch to the Design Mode and press the Enter key;
5. Switch to the HTML Mode again.


Result:


The RAD Editor changes the HREF attribute value. The value in the brackets, from the <a></a> tag, is added to the HREF attribute value. In the issue the link is corrupted.

Like bellow:
<p><a href="http://www.test.com (Test link)">www.test.com (Test link)</a></p>
<p>&nbsp;</p>


Expected result:
The RAD Editor should not change the HREF attribute value. The value in the brackets should not copy to the HREF attribute value.

Best Regards,

Oleg Burov

Dobromir
Telerik team
 answered on 15 Sep 2010
0 answers
86 views
Good morning everyone,
I have RadListBox with ItemTemplate like this:

<ItemTemplate>
<asp:ImageButton runat="server" ID="imgTrashIcon" ImageUrl="~/url" />
 <asp:Literal runat="server" ID="ltr" Text='<%# Eval("") %>' />
</ItemTemplate>

Can I delegate ImageButtons' OnClick event to the ListBoxItem i. e. it fires (and returns current data item) only when I click on the image, but not on the rest part of list box item.

Thanx a lot
void
Top achievements
Rank 1
 asked on 15 Sep 2010
1 answer
130 views
Dear Support-Team

How can I get the (hierarchical) index of the current row and the the dataitem on client side (javascript) on a Self-referencing hierarchy?
   
If I try args.get_itemIndexHierarchical(); I get a hierarchical string like "0:0_0:0_0". How can I extract the row index? Is their a build in function? And how get I the right master or detail table on which the current row index acts?

A example would be very helpful.

Thanks in advanced.

KInd regards
Christian
Iana Tsolova
Telerik team
 answered on 15 Sep 2010
1 answer
221 views
Guys,

We r planning to buy Telerik Asp Ajax controls. I would like to know how the track changes works in the editor?. I got requirement to integrate track changes facility in editor, When some one edits the rich text content and submit the content for approval, the Approver/Manager should be able view the track changes. So I would like to know, how the track changes works?. Will the track changes is retained over postbacks. Is the track changes contents are stored inside the actual data?.

Can you provide me the full details of how the track changes works in Telerik Editor?.

Thanks,
Anbu
Dobromir
Telerik team
 answered on 15 Sep 2010
9 answers
854 views
i have a requirement wherein i need to edit the control in radgrid row itself i.e. in all the examples involving here manual edit or auto events when we click edit the control to which it is binded comes below like in the attached image you can see that when i click edit the column status comes below with an update and cancel button.
what i need to accomplish is i need that control in this case dropdown list in the same row and not below, could any of you guys please guide me with this.
I have done it using Grid view using the row edit command something like this
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
   {
       string name,idval;
       name = ((Label)GridView1.Rows[e.NewEditIndex].FindControl("lbl_trainer")).Text ;
       idval = ((Label)GridView1.Rows[e.NewEditIndex].FindControl("lbl_trainerid")).Text;
         
       DropDownList1.Enabled = false;
       GridView1.EditIndex = e.NewEditIndex;
       bind();
       DropDownList drp_trg = (DropDownList)GridView1.Rows[e.NewEditIndex].FindControl("drp_trg");
       drp_trg.SelectedIndex = drp_trg.Items.IndexOf(new ListItem(name, idval));
   }

source looks something like this...

<asp:GridView ID="GridView1" runat="server" Width="100%" EmptyDataRowStyle-HorizontalAlign="center" AutoGenerateColumns="False" AlternatingItemStyle-CssClass="Gridalt" CssClass="Gridrow" DataKeyNames="progname,sch_no" 
        OnRowCancelingEdit="GridView1_RowCancelingEdit" 
        OnRowEditing="GridView1_RowEditing" 
        OnRowUpdating="GridView1_RowUpdating" OnRowDataBound="GridView1_RowDataBound" >
                            <Columns>
                                                                <asp:TemplateField HeaderText="Status">
 <EditItemTemplate>
          <asp:DropDownList ID="grd_drp_status" runat="server" SelectedValue='<%# Bind("status") %>' >
         <asp:ListItem Selected="True">Scheduled</asp:ListItem>
         <asp:ListItem>Completed</asp:ListItem>
         <asp:ListItem>Cancelled</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
        <asp:Label ID="lbl_status" runat="server" Width="100%" Text='<%# Bind("status") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</asp:GridView>

i want to accomplish the same thing in Radgrid could you please guide me through this....
and p.s i am using Radgrid version 2009.1.311.35

Senthil ramna
Top achievements
Rank 1
 answered on 15 Sep 2010
1 answer
221 views
Currently our date pickers have a min/max date set.  When the user enters a bad date they are greeted with the red box and the yellow warning symbol within the data picker.  This is just like this demo site, when you enter 1/1/0050
http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/validation/defaultcs.aspx

Here is the deal.  The users are asking what is wrong wtih that data input.
Is there a way to provided an aditional validation message to the user that 'the date must be between [1/1/1000] and [1/1/3000]'?

Thanks for the help.



Iana Tsolova
Telerik team
 answered on 15 Sep 2010
3 answers
115 views
Hi

How can I get the CurrentColorText (defaults to '(Current Color is {0})', to display the colour name rather than the hex value  in {0} ???

Shame question for preview too so I would like to see...

'Your team colour is Yellow' not 'Your team colour is FF66C3' etc.

Terry
Rumen
Telerik team
 answered on 15 Sep 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?