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

I want to freeze some columns from left side in the radgrid and navigate to other columns using a horizantal scroll bar , how to do it ?

i'm also using GridClientSelectColumn column in the grid

kindly provide some solution

Regards,

Princy
Top achievements
Rank 2
 answered on 03 May 2010
2 answers
144 views
Hello,

I need to check if a cell that the user is editing (cell in edit mode) does not exist in the rest of the radgrid (for the same column).
Since radgrid1.Items retrieves just the items of the current page, I tried to disable paging and filtering for a while in the validation method raised by the OnServerValidate event.
That's ok, but rebinding creates some problems for me.
Take as example that the user inserts a value duplicated.
The OnServerValidate event occurs twice in sequence (I don't know why) and the second time it is raised the cell changed by the user has the original text before editing (in fact we did a rebind!) and my validation method evaluates that everything is ok and generates no error message and no change in the DB. The expected behaviour was that the user receives a message error: "Duplicate value".

Could you help me?
Is there a way to disable paging and filtering without rebinding the grid, but just refreshing the interface?

Following is the code.

Thanks in advance.

    Public Sub ValidateDescriptionDuplicates(ByVal source As ObjectByVal args As ServerValidateEventArgs)  
        Dim desc As String 
        Dim id As String 
 
        Dim tb As New TextBox()  
        Dim hi As New System.Web.UI.HtmlControls.HtmlInputHidden()  
        Dim dvt As DataView  
        Dim dvr As DataRowView  
        Dim err As Integer 
        Dim e As DataGridItem  
        Dim dgi As GridDataItem  
 
        If Page.IsValid Then 
            dgi = Me.RadGrid1.EditItems(0)  
 
            Dim t As New Translate()  
 
            desc = MyRadUtility.GetControlValue(dgi, "textbox")  
            id = MyRadUtility.GetGridValue(dgi, "ID")  
            err = 0  
              
            RadGrid1.AllowPaging = False 
            Dim filterExp As String = RadGrid1.MasterTableView.FilterExpression  
            RadGrid1.AllowFilteringByColumn = False 
            RadGrid1.Rebind()  
 
            For Each dgiTemp As GridDataItem In RadGrid1.Items  
                If desc = GetControlValue  
dgiTemp, "label"And Not dgiTemp.GetDataKeyValue("ID") = id Then 
                    If Not Me.Customvalidator2 Is Nothing Then 
                        Me.Customvalidator2.Text = t.TranslateString("Attention! Description already inserted!")  
                    End If 
                    err = err + 1  
                End If 
            Next 
 
            RadGrid1.AllowPaging = True 
            RadGrid1.AllowFilteringByColumn = True 
            RadGrid1.MasterTableView.FilterExpression = filterExp  
            RadGrid1.Rebind()  
              
            If err = 0 Then 
                args.IsValid = True 
            Else 
                args.IsValid = False 
            End If 
        Else 
            args.IsValid = True 
        End If 
    End Sub 
saggiatorius
Top achievements
Rank 1
 answered on 03 May 2010
7 answers
172 views
Hi I'm using 2010Q1 library.
I'm trying to use following approach to validate input values:

<asp:TextBox runat="server" ID="MessageText" TextMode="MultiLine" ValidationGroup="Contact" /> 
<asp:LinkButton ID="SendBtn" ValidationGroup="Contact" runat="server" Text="Send" /> 
<telerik:RadInputManager  ID="ContactRadInputManager" runat="server"
    <telerik:TextBoxSetting BehaviorID="MessageBehavior" EmptyMessage="Message" ErrorMessage="Please enter message" 
                            Validation-IsRequired="true" Validation-ValidationGroup="Contact"
        <TargetControls> 
            <telerik:TargetInput ControlID="MessageText" /> 
        </TargetControls> 
    </telerik:TextBoxSetting>     
</telerik:RadInputManager> 

During initial page load MessageText control shows EmptyMessage as expected. Then (don't enter text box) click SendBtn button text box. Text box shows error message as expected. After that if I focus to text box it shows EmptyMessage instead of blank field. And any uses' input is appended to EmptyMessage (see attached pics).
Please let me know what I'm doing wrong or provide some workaround if this issue.

Thank you.
Pavel
Telerik team
 answered on 03 May 2010
1 answer
104 views
I am trying to create a checkbox list in a radgrid.  I get it to populate, but the problem I am having is updating the field in the database as well as checking the values of the fields of the column in the db table to set the boxes to be checked when the edit button is clicked.  Any suggestions?
Shinu
Top achievements
Rank 2
 answered on 03 May 2010
1 answer
143 views
Hello I have a RadListBox with ItemTemplates which have image button inside, how can I pick the event when the button is clicked as I see RadListBox has no OnItemCommand event.
In my case I put custom delete button inside ItemTemplate like this
<telerik:RadListBox ID="listboxAddresses" Height="158" Width="200" runat="server"
                <ItemTemplate> 
                    <div class="ListBoxItem"
                        <table width="130"
                            <tr> 
                                <td> 
                                    <asp:Label ID="lblCity" runat="server"></asp:Label> 
                                    <br /> 
                                    <asp:Label ID="lblAddress"  runat="server"></asp:Label> 
                                </td> 
                                <td align="right" width="15"
                                    <asp:ImageButton ID="btnDelete" CommandName="Delete" ImageUrl="~/Images/icons/delete.png" runat="server" /> 
                                </td> 
                            </tr> 
                        </table> 
                    </div> 
                </ItemTemplate> 
</telerik:RadListBox> 


Princy
Top achievements
Rank 2
 answered on 03 May 2010
6 answers
135 views
Hi,

I am using Telerik radgrid in my application and i am unable to find out the solution for the radgrid behaviour which is shown in the attached image.

I tried to resize the grid but no luck!

I would really appreciate if someone can guide me the solution.

BTW i am using IE8. It is absolutely working fine in IE 7 and 6 versions and the telerik version is Q1 2009.

Thanks,
Shashi
Rosen
Telerik team
 answered on 03 May 2010
4 answers
313 views
Hi All,

I have a custom web part which includes RAD Chart control.
This web part is used in WSS 3.0.

There are following two methods available in RAD Chart to create chart's temp images.

1. Use Session
2. Use Folder

First method can not be used in my case because sessions are disabled in WSS 3.0 by default and I dont want to enable it.

So I used second method in my RAD Chart.

Please refer the following code for details:

*************************************************************************

// Create chart object.

 

RadChart radChartObj = new RadChart();

 

radChartObj.EnableViewState =

false;

 

radChartObj.UseSession =

false;

 

radChartObj.TempImagesFolder = 

"~/_layouts/Documenta/Reports/TempFiles";

 

radChartObj.ID =

"radChart";

 


*************************************************************************

If I log in to my SharePoint site with the user who has 'Write' permissions on 'TempFiles' folder, then chart is created successfully.
But If I log in with user who does not have 'Write' permissions on 'TempFiles' folder, then RenderContents() function of web part throws exception.

Exception details:
A generic error occurred in GDI+. Check the folder specified in the TempImagesFolder property of the control. Current value is "/_layouts/Documenta/Reports/TempFiles". The folder should exist and must have been granted write permissions for the ASPNET user.
---------------------------------------------------------------

My web application's pool identity is Network Service.
I assigned 'Write' permissions on 'TempFiles' folder for Network Service and ASPNET user.
But behavior remains same. RenderContents() function throws an exception.

Please suggest a solution so that I don't need to assign 'Write' permission for each user of SharePoint site.

Please let me know if I can use SPSecurity.RunWithElevatedPrivileges in this case. It is just an idea. May be it is not valid in this case.

Please let me know your comments.
It is really urgent.

Thanking you in anticipation.
Bernd Brotter
Top achievements
Rank 1
 answered on 03 May 2010
2 answers
229 views
Hi All,

I have a custom web part which includes RAD Chart control.
This web part is used in WSS 3.0.

To create chart's temp images, I am using temp folder created at path "~/_layouts/Documenta/Reports/TempFiles".

Please refer the following code for details:

*************************************************************************

// Create chart object.

 

RadChart radChartObj = new RadChart();

 

radChartObj.EnableViewState = false;

 

radChartObj.UseSession = false;

 

radChartObj.TempImagesFolder = "~/_layouts/Documenta/Reports/TempFiles";

 

radChartObj.ID = "radChart";

 

 

*************************************************************************

As per Telerik documentation, web application should have 'write' permissions to the temporary folder.
Please refer to the below link:
http://www.telerik.com/help/aspnet-ajax/advancedsession.html

My web application's pool identity is Network Service.
So, I assigned 'Write' permissions on 'TempFiles' folder for Network Service and ASPNET user.


If I log in to my SharePoint site with the user who has 'Write' permissions on 'TempFiles' folder, then chart is created successfully.
But If I log in with user who does not have 'Write' permissions on 'TempFiles' folder, then RenderContents() function of web part throws exception.

Exception details:
A generic error occurred in GDI+. Check the folder specified in the TempImagesFolder property of the control. Current value is "/_layouts/Documenta/Reports/TempFiles". The folder should exist and must have been granted write permissions for the ASPNET user.
---------------------------------------------------------------


Please suggest a solution so that I don't need to assign 'Write' permission for each user of SharePoint site.

Please let me know your comments.
It is really urgent.

Thanking you in anticipation.

Regards,
LJ
Bernd Brotter
Top achievements
Rank 1
 answered on 03 May 2010
0 answers
70 views
Hello,

I'm using RadPanelBar and have defined some item in it (RadPanelItem). For these items I need to customize the band as follows:

1. Hide the default expaned/collapsed image (which is shown in the right side of the band). ?

2. I'm showing my own images for expaned / collapsed states as below, and also I want to set "uparrow.gif" as default image for the band ,how to set a default image for the band  ?

<telerik:RadPanelItem Text="Employees" Value="emp" Expanded="true" ExpandedImageUrl="uparrow.gif" SelectedImageUrl="downarrow.gif">
  <telerik:RadGrid ID="grdEmp" GridLines="None" runat="server" AllowAutomaticDeletes="True"  EnableViewState="true"
                                                            AllowMultiRowSelection="true" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                                                            AllowPaging="false" Skin="Telerik" AutoGenerateColumns="False" DataSourceID="emp"
>

3. in another case , i have a radgrid under the radpanelitem, and want to set the number of records of the grid to be displayed in the radpanelItem band on the right hand side , for example 14500 item(s)

Kindly suggest.

Regards,



Hema Raju
Top achievements
Rank 1
 asked on 03 May 2010
4 answers
118 views
Hi,
    I am using Radgrid with GridTemplateColumn which is a textbox.
My requirement is when I enter Insert mode, i want to make all the textboxes in the grid readonly.
Please let me know how to do this?
Swapna M
Top achievements
Rank 1
 answered on 03 May 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?