Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views
I want to customize the radEditor ColorPicker. I know how to add my own colors, but I would want to modify the number of colums it is showing (By default it seems to be 10)

Thank you again Telerik team!
Rumen
Telerik team
 answered on 05 Jul 2010
2 answers
160 views
Hi, I'm trying to use a combobox in a grid like in the exaple here: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/comboingrid/defaultcs.aspx?product=grid

The only thing is, I would like to do some formatting etc. on the combobox, so I did:
                                <telerik:gridtemplatecolumn uniquename="IconID" datafield="IconID" headertext="Icon">
                                    <itemtemplate>
                                        <asp:image id="imgIcon" runat="server" />
                                    </itemtemplate>
                                    <edititemtemplate>
                                        <telerik:RadComboBox  
                                            ID="rcbIcon"
                                            runat="server" />
                                    </edititemtemplate>
                                </telerik:gridtemplatecolumn>

And then in the codebehind:

#Region "rgCategories_ItemDataBound"
        Protected Sub rgCategories_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgCategories.ItemDataBound
            If e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem Then
                Dim objCategoryInfo As CategoryInfo = CType(e.Item.DataItem, CategoryInfo)
                If objCategoryInfo.IconID <> -1 Then
                    _Icon = objCategoryInfo.IconID
                    Dim objIcon As MarkerInfo = lstMarkerInfo.Find(AddressOf FindIcon)
                    If Not objIcon Is Nothing Then
                        Dim imgIcon As System.Web.UI.WebControls.Image = CType(e.Item.FindControl("imgIcon"), System.Web.UI.WebControls.Image)
                        imgIcon.ImageUrl = objIcon.MarkerFilename
                    End If
                End If
            End If
            If e.Item.ItemType = GridItemType.EditItem Then
                Dim comboBox As RadComboBox = DirectCast(e.Item.FindControl("RCBIcon"), RadComboBox)
                comboBox.Items.Clear()
                Dim objMarkerInfo As MarkerInfo
                Dim itemtext As String

                For Each objMarkerInfo In lstMarkerInfo
                    itemtext = objMarkerInfo.MarkerFilename.Replace(".png", "")
                    itemtext = itemtext.Remove(0, itemtext.LastIndexOf("/") + 1)
                    Dim item As New RadComboBoxItem()
                    item.Text = itemtext
                    item.Value = objMarkerInfo.MarkerID
                    item.ImageUrl = objMarkerInfo.MarkerFilename
                    comboBox.Items.Add(item)
                Next

                Dim objCategoryInfo As CategoryInfo = CType(e.Item.DataItem, CategoryInfo)
                If objCategoryInfo.IconID <> -1 Then
                    If Not comboBox.FindItemByValue(objCategoryInfo.IconID) Is Nothing Then
                        comboBox.FindItemByValue(objCategoryInfo.IconID).Selected = True
                    End If
                End If
            End If
        End Sub
#End Region

However when I try to update, the IconId will always be 0 instead of the selected icon from the dropdown


Marnix Bouwman
Top achievements
Rank 2
 answered on 05 Jul 2010
2 answers
82 views
Hi there,

My users are uploading HTML content via a RadEditor control on their personal page.  (They will be pasting content from a source with the Editor in Design Mode rather than entering HTML directly.)  I would like to set the RadEditor control so that any links they include in their content automatically have a target="_blank" attribute inserted (if not already present), or do something equivalent so that on the resulting page the links will be opened in a new window/tab (rather than taking the viewer away from my web-site).  Any suggestions?

All advice gratefully received,

Ed Graham
Ed
Top achievements
Rank 1
 answered on 05 Jul 2010
1 answer
181 views
how can i create a custom RadGrid Filter?
in other words i have a gridview, and i want to create a custom Filter on a certian GridBoundColumn. i know that i should use this:

<

 

telerik:GridBoundColumn DataField="ID" HeaderText="ID"

 

 

<FilterTemplate>

 


</

 

FilterTemplate>

 

 

</telerik:GridBoundColumn>

but lets say i have a listbox inside the above filterTemplate. how can i add the FilterButton (that shows equalto,notequalto.... when clicked) so a user can choose an item from the listbox, and filters accordingly.

i have already seen this link:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx
but this link adds a dropdownlist to the GridBoundColumn Filtertemplate, but it filters when the selectedValue of the dropdownlist changes. what i need is the same filterButton that appears by default (that contains the filter criteria when selected)

 

Pavlina
Telerik team
 answered on 05 Jul 2010
1 answer
60 views
I like to add some kind of lines for specific dates in the time line view (see attachment).

Does anyone has an idee on how to accomplish this?

Peter
Telerik team
 answered on 05 Jul 2010
4 answers
146 views
Hi, I'm using RadGrid for inserting and updating data. I have enabled AutoGenerateEditColumns to true. But when I edit data, its not updating the data back. I have a stored procedure to update data in the business layer and from

RadGrid1_ItemUpdated

event i'm calling that function. But control is not going inside  RadGrid1_ItemUpdated event. I'm binding the grid dynamically from oracle database. Any help would be appreciated.
Aspx:

 

<

 

asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

 

 

 

<ContentTemplate>

 

 

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" PageSize="5"

 

 

Width="612px" AutoGenerateEditColumn="True"

 

 

oniteminserted="RadGrid1_ItemInserted" onitemupdated="RadGrid1_ItemUpdated"

 

 

onneeddatasource="RadGrid1_NeedDataSource">

 

 

 

 

 

<PagerStyle AlwaysVisible="True" />

 

<

 

MasterTableView>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

 

 

 

<PagerStyle AlwaysVisible="True" />

 

</

 

MasterTableView>

 

 

 

 

 

<EditItemStyle BackColor="#FFFF66" BorderColor="Black" BorderStyle="Solid" />

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

</ContentTemplate>

 

 

 

 

 

</asp:UpdatePanel>

 


aspx.cs file:

protected

 

void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)

 

{

 

if (e.Item is GridEditFormItem && e.Item.IsInEditMode)

 

{

BAL.

BAL balobj = newBAL.BAL();  //Business layer object

 

 

int flag = 0;

 

 

GridEditableItem item = (GridEditableItem)e.Item;

 

 

string cty = item.GetDataKeyValue("city_name").ToString();

 

 

string id = item.GetDataKeyValue("city_id").ToString();

 

 

//calling validation function

 

flag = balobj.validate_cityName(cty);

 

if (flag == 0)

 

{

balobj.New_City_Name = cty;

balobj.City_Id = int.Parse(id);

 

balobj.city_modify();

}

 

else

 

{

Label1.Visible =

true;

 

Label1.Text =

"<script>alert('City name already exists')</script>";

 

}

}

}

Pavlina
Telerik team
 answered on 05 Jul 2010
5 answers
115 views
Hi,
I am trying out ASP.NET Ajax RadControls and have an issue with ajaxifying a specific control on a sub ASCX control.

I have ajaxified the buttons on the main page ok. But no matter what I have tried on the sub ASCX i cannot get the radcombobox to fire the onselectedindexchanged event.

The heirarchy is as follows...
- Default.aspx
    - Content_RegistrationLookup.ascx
        - Sub_VehicleBrowser.ascx
            - RadComboBox_Make (this is the control I wish to ajaxify to update RadComboBox_Model)

So there are two nested ascx controls. I have tried the following...

 

  • Putting this on the Page_Load event of Sub_VehicleBrowser.ascx to add the ajax setting to the main page manager

RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadComboBox_Make, RadComboBox_Model, RadAjaxLoadingPanel1)

 

  • Using a RadAjaxManagerProxy with the same setting as coded above in the Sub_VehicleBrowser.ascx control
  • Wrapping the RadComboBoxes in Panels and using the Panels as the update controls in RadAjaxManager

The entire visual studio 2010 project so far can be downloaded here http://www.ignitioncarparts.co.uk/cpc.zip.

I would be very grateful for any help.

Thanks,
Lee

Tsvetoslav
Telerik team
 answered on 05 Jul 2010
4 answers
111 views
So within my project I have an aspx page with one RadDockZone and three RadDocks within. Inside each RadDock is a web user control containing a TabStrip. Within each tab are two RadGrids. If I only drop the controls on the page and set the bare minimum to get the grids populated, it takes around a minute or so for the page to even appear. This is to be expected with the sheer number of grids that are just loading whether they can be seen (remember, they're in tabs) initially or not.

My idea is that when each web user control loads, it will only populate the RadGrids on the first tab. When a different tab is clicked, it will go out behind the scenes (AJAXily) and load whichever tab's grids was clicked on.

My question is multi-part:
1. Am I on the right track for fast loading? Are there any better ideas?
2. What's the fastest way to load a RadGrid? Client-side WebService? LINQ?
3. Are there any brief examples of this in the code library?

Thank you very much in advance. I hope my question was clear enough.
Yana
Telerik team
 answered on 05 Jul 2010
1 answer
193 views
Hi
all

I am using a Radeditor and Rad upload control in my page.
When the page postback when i click on save button. If there are any back end validations that are not satisfied,
and it returned to same page i see that rad editor is getting freezed and even the rad upload control is not visible.


Thank you
Mani

Rumen
Telerik team
 answered on 05 Jul 2010
6 answers
513 views
In Java Swing or JSF, there is a TreeTable component. Is it possible to implement something similar by integrating RadTreeView and RadGrid?
Sebastian
Telerik team
 answered on 05 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
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?