Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views

 

Hello i need to convert from GridView to RadGrid, can anyone give me some suggestions on how to do this with RadGrid please?
IE, i basically would like to just loop thru each Grid Row and each Grid Column and if find that the Row.Cell approach is very intuitive, is there such an intuitive approach with the RadGrid?

Thanks very much for any pointers!

protected
void dgColumns_RowDataBound(object sender, GridViewRowEventArgs e)

 

{

 

try

 

{

 

if (e.Row.RowType == DataControlRowType.DataRow)

 

{

 

SelectedColumn col = AllSelCols[e.Row.RowIndex];

 

(e.Row.Cells[2].FindControl(

"txtAlias") as System.Web.UI.WebControls.TextBox).Text = col.Alias;

 

(e.Row.Cells[3].FindControl(

"chkOutput") as CheckBox).Checked = col.Output;

 

 

if (col.SortType != string.Empty)

 

{

(e.Row.Cells[4].FindControl(

"ddlSortType") as DropDownList).Items.FindByText(col.SortType).Selected = true;

 

}

(e.Row.Cells[5].FindControl(

"txtSortOrder") as System.Web.UI.WebControls.TextBox).Text = col.SortOrder;

 

}

}

 

catch (Exception ex)

 

{

lblErrorScriptManager.Visible =

true;

 

lblErrorScriptManager.Text = ex.Message;

}

}

Bob
Top achievements
Rank 1
 answered on 28 Sep 2009
1 answer
146 views
Would it be possible to enhance the Binaryimage so you could save only the filename in the SQLDB and read the image from disc?
It would benefit a lot for liveresize and so on....
Sebastian
Telerik team
 answered on 28 Sep 2009
3 answers
368 views
I have a masked text box for a phone number (###) ###-####.

But when the user clicks on the box it select whereever they clicked.  Is there a way to make it act like a text box and go ot the far left place?
Dimo
Telerik team
 answered on 28 Sep 2009
3 answers
498 views
I don't know where else to ask this, but I figured this was as good a forum as any other.

I am making a number of web user controls and each control has a property for which skin should be applied to all of the Telerik RAD AJAX controls in my web user control. Right now there are at least 15 Telerik skinnable controls on the page.

What I want to do is to write a piece of code suchly:

If (CustomSkinName <> "") Then
For Each Control In Page.Controls
If ([[Control is a Telerik Skinnable Control]]) Then
Control.EnableEmbeddedSkins = False
Control.Skin = CustomSkinName
End If
Next Control
End If

First question is: How do I determine "Control is a Telerik Skinnable Control"? 

Secondly, it would appear that Grids and Charts don't share any common ancestor that has the skinning properties. What would the proper ancestor class be? Is there a better way? Reflection?
Dimo
Telerik team
 answered on 28 Sep 2009
1 answer
243 views
Hi there,

We are using the RadCalendar, Version: 2008.2 1001 and have managed to set a dynamic date range where the inactive days are faded and the active days bolded. 

There is the class...

.outOfRange_Telerik span

which sets the inactive days to a certain colour. And.....

.TableLayout_Telerik a,
.TableLayout_Telerik span


Which sets the active days in the range to a another colour.

Now in the active date range only some of the days are actually active where the user can physically click on the days but we are not sure whether or not we can set these days to a specific colour in the css as well. Can this be done?

Many thanks,

Patrick
Dimo
Telerik team
 answered on 28 Sep 2009
2 answers
170 views
I am running into a style issue in IE 8 where the header width is smaller than the column's content width.  The Grid sample for Column/Row Resize/Reorder is having this same issue when using IE 8.  Is there any suggestion on how this could be fixed?
Pavlina
Telerik team
 answered on 28 Sep 2009
1 answer
75 views
Hi guys

I try to follow the instructions provided here http://www.telerik.com/help/aspnet-ajax/create-ajax-enabled-sharepoint-webpart-radcontrols.html with any positive result about it, Im using a radstrip with a multipage with grids inside, and I expect to refresh the multipage on any click on tabstrip, my webpart is made on ascx and I test it on a normal page and the ajax works, but when I try to install it on moss seems like it is ajaxfied correctly shows the loading panel but the multipage never change and the grid inside either, so what can I do to get this scenario working, I will provide u my code if you need it.

thanks in advance

KMILO
Sebastian
Telerik team
 answered on 28 Sep 2009
9 answers
201 views
Hi,

I'm successfully using Drag-Drop between a tree and a grid based on this example:
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/draganddropnodes/defaultcs.aspx

However, I can't get the most recently added (dropped-on-grid) row to immediately open into Edit mode. The "edit" button works fine on the row and opens the EditItem template without problems, but I want the newly added row to initially appear in this edit mode. I've tried many methods: OnDataBound -- no go, OnDataBinding -- no go, OnItemCreated -- works fine, buts get called for each of the newly added items, and since I am updating the RadGrid each time from a DataTable, ALL of the items are newly created each time (just like in the example). So, any tips on how to force the most recently entered (newest, last-in-table) row to open into edit mode when added? I don't care whether it is client or server side (or mixture) code.

Thanks for any tips!
R
Richard
Top achievements
Rank 2
 answered on 28 Sep 2009
2 answers
80 views
Hello everybody. I'm dealing with the following problem. I have a radgrid inside which I want to have a commandItemTemplate. This has some controls: one of them is a radtextbox. I would like to add a requiredfield validator to the textbox.
When I had the CausesValidation='True' property to a button inside the commandItemTemplate I found out that the event does never get fired.
How can I solve this problem?

P.S. If I put the CausesValidation to False I don't have the problem anymore.
Lia
Top achievements
Rank 1
 answered on 28 Sep 2009
6 answers
198 views
I have just upgraded to the new release, I was on 2008 Q3 before.  I have a control that uses a radToolBar and the skins just don't seem to fit properly anymore whereas I wasn't having any difficulty at all before.

The Control:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="TopNavigation.ascx.vb" 
    Inherits="ReDA2Portal.WebUserControl1" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<telerik:RadToolBar ID="rtbTopNavigation" runat="server" 
    Width="960px" Skin="WebBlue"></telerik:RadToolBar> 
#Region "Functions and Subs" 
 
    Sub getSections() 
        Dim dt As DataTable = ReDA2Classes.baseClass.GetDataTable("SELECT * FROM tblsection ORDER BY SectionOrder", ConnStr.ConnectionString.ToString) 
        Dim r As DataRow 
 
        For Each r In dt.Rows 
 
            Dim b As New Telerik.Web.UI.RadToolBarButton(r("SectionName")) 
            b.NavigateUrl = "~/" & r("URL") 
            b.Visible = r("IsVisible") 
            rtbTopNavigation.Items.Add(b) 
 
        Next 
    End Sub 
#End Region 
 
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        If Not Me.IsPostBack Then 
            getSections() 
        End If 
    End Sub 

It is being placed in a div on a page:
            <div class="divHeader"> 
                <div class="divHeaderWrap"> 
                    <uc1:TopNavigation ID="TopNavigation1" runat="server" /> 
                </div> 
            </div> 
.divHeader 
{  
    width: 100%     
} 
 
.divHeaderWrap 
{ 
    width: 960px; 
    margin: auto 
} 

And this is what it is showing:
http://img233.imageshack.us/img233/1473/69304635.jpg

I also have some raddocks and the skins for them don't seem to be displaying properly either.  They look weird in IE7 and are just flat colurs in firefox.  I am pretty certain that both problems are caused by the same issue but I can't find anything at the moment.  They were all working perfectly well on the last version I had which was 2008.3.1125.35 the version I am on now is 2009.2.826.35





Guy
Top achievements
Rank 1
 answered on 28 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?