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

Can we put only top border for radgrid pager when we enable EnableEmbeddedSkins="false" to a radgrid? I did the following way but it didn't work.

        .rgpager
        {
           border-top: solid 1px black !important;
        }

 <PagerStyle BackColor="#F5F5E9" ForeColor="#F5F5E9" CssClass="rgpager" />

Grid Settings

<telerik:RadGrid ID="rgDependency" runat="server" Height="476px" GridLines="None"
    ShowGroupPanel="false" ShowFooter="false" AutoGenerateColumns="false" EnableEmbeddedSkins="true"
    AllowPaging="true" PageSize="20" BorderStyle="None" BorderColor="Black" BorderWidth="0px"
    BackColor="White" OnItemCommand="rgDependency_ItemCommand" OnItemDataBound="rgDependency_ItemDataBound"
    OnNeedDataSource="rgDependency_NeedDataSource" AllowSorting="true">
    <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White"
        HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" />
    <ItemStyle HorizontalAlign="Center" BackColor="White" />
    <CommandItemStyle BackColor="#f5f5e9" ForeColor="#f5f5e9" Height="10px" />
    <AlternatingItemStyle BackColor="#F5F5E9" HorizontalAlign="Center" />
    <PagerStyle BackColor="#F5F5E9" ForeColor="#F5F5E9" CssClass="rgpager" />
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" HideStructureColumns="true"
        Excel-Format="ExcelML" />
    <MasterTableView DataKeyNames="DependencyNumber" CommandItemDisplay="Top" GridLines="None">
        <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="true" ShowAddNewRecordButton="false" />
        <Columns>
            //columns
        </Columns>
        <NoRecordsTemplate>
            No Dependencies found</NoRecordsTemplate>
    </MasterTableView>
    <ClientSettings>
        <Resizing AllowColumnResize="true" />
        <Scrolling AllowScroll="true" ScrollHeight="400px" UseStaticHeaders="true" />
    </ClientSettings>
</telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 14 Jul 2011
5 answers
226 views
Hi!

I would like to know if there is a way of changing the language of a filter in a grid aswell anothers objects in the grid. I tried the cultural but it didn't work.

Many Thanks,
FEST
Princy
Top achievements
Rank 2
 answered on 14 Jul 2011
1 answer
64 views
Here is the context I have a multi-lingual menu that is databound to a datatable and when the submenu is expanded the top menu loses its hover image. this hover background image looks like a tab and melds into the submenu. hence when I rollover the submenus it looks really bad. I need a css solution because the image needs to be in the background behind the text.
Joseph
Top achievements
Rank 1
 answered on 13 Jul 2011
2 answers
119 views
I have a template set up and would like to access the linkbuttons on the edittemplate form and change their text based on the mode of the grid. If i'm inserting I want that row's linkbutton.text = "insert" and if that row is not inserting, but still in edit mode linkbutton.text = "Update". As an example, if you start to edit a row, then click "Add new record", you end up with 2 editable rows. One for inserting and one for editing... I want to distinguish between the two.
any examples or idea's on how to do this?

I know I can pull the commandname from itemCommand and check for InityInsertCommand and set a form level boolean, then check against that boolean in itemcreated..
    Protected Sub rgCurrent_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgCurrent.ItemCommand
        If e.CommandName = RadGrid.InitInsertCommandName Then
            inserting = True
        End If
    End Sub
 
    Protected Sub rgCurrent_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgCurrent.ItemCreated
        If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode and inserting Then
'This returns every editable row while in insert mode, but I want only the insert row
        End If
    End Sub
bob
Top achievements
Rank 1
 answered on 13 Jul 2011
1 answer
121 views
Hi

I have a Page A where on button click, I display another page B using radwindow dialog. When button OK is clicked on page B, some data processing is done, dialog is closed and then page is redirected to Page C.
In this scenario, sometimes it takes considerable amount of time when the dialog is closed and page C is loaded. During this time, page A is still available (after the dialog is closed) and user may not know if the processing is going on.

Hence I thought to display a loading panel on Page A once the Dialog of page B is closed. Then this loading panel should stay on the page A until it is redirected to Page C. I do not want to refresh Page A once the dialog page B is closed. 

I tried loadingpanel.show() in the javascript of radwindow eventhandler "OnclientClose". this didnt work. How can I display loaing panel from javascript until page is redirected to page C.  



Genti
Telerik team
 answered on 13 Jul 2011
1 answer
76 views
Hi All,
 
I am following the example of related combox box in my web application. everything works the way it is mentioned in the example except that the second combo box gets cleared when i select something from the second combo box. I want the items in the second combo box to stay there till I select something else from the first combo box. How can i achieve this.

Thanks.
Dimitar Terziev
Telerik team
 answered on 13 Jul 2011
1 answer
313 views

Hello,

 I have a question I hope someone has an answer for.

 

I have a custom control that includes  the RadAsyncUpload control.  In the onInit event handler calculate a MaxFileSize based on a config file setting and then register a couple of scripts to handle the error display if the file being uploaded exceeds the MaxFileSize:

 i.e

             StringBuilder sb = new StringBuilder();

             sb.Append("\n\t<script type=\"text/javascript\">\n\t\tfunction UploadValidationError(sender, eventArgs)\n\t\t{\n\t\t\talert('")

              .Append(AlertText1)
              .Append(": ' + eventArgs.get_fileName() + ' ")
              .Append(AlertText2).Append(" ")
              .Append(MaxFileSize.ToString())
              .Append(" kb.\');\n\t\t}\n\t</script>");

             Page.Header.Controls.Add(new LiteralControl(sb.ToString()));               

 

            StringBuilder sb2 = new StringBuilder();

             sb2.Append("\n\t<script type=\"text/javascript\">\n\t\tfunction FileUploadError(sender, eventArgs)\n\t\t{\n\t\t\talert('")
               .Append(AlertText3)
               .Append(" ' +  eventArgs.get_message() );\n\t\t}\n\t</script>");

              Page.Header.Controls.Add(new LiteralControl(sb2.ToString()));

 Then when the RadAsyncUpload control is being added to the

            public Telerik.Web.UI.RadAsyncUpload _uploadControl = new Telerik.Web.UI.RadAsyncUpload();

  

                this._uploadControl.ID = "u" + this.QuestionID;

                this._uploadControl.InitialFileInputsCount = 1;
                this._uploadControl.MaxFileInputsCount = 1;
                this._uploadControl.MaxFileSize = MaxFileSize;
                this._uploadControl.FileUploaded += new FileUploadedEventHandler(File_FileUploaded);
                this._uploadControl.TemporaryFolder = _fileVirtualPath;
                this._uploadControl.TargetFolder =_fileVirtualPath ;
                this._uploadControl.HttpHandlerUrl = "~/RadUpload/RadUploadFile.ashx";
                this._uploadControl.Width = new Unit(250);
                this._uploadControl.CssClass = "normalRemoveButton";
                this._uploadControl.OnClientValidationFailed = "UploadValidationError";
                this._uploadControl.OnClientFileUploadFailed = "FileUploadError"; 
                this._uploadControl.Style.Add("display", "block");   
                this._uploadLabel.Text = NoFileSelectedText;
                this._uploadLabel.Enabled = false;
                this._uploadControl.Culture = new System.Globalization.CultureInfo(CultureCode);

This all works flawlessly on most browsers, select a file too large and the alert box pops up indicating that the filesize exceeds the limit.  However on some testers machines, when they select a file to upload that is way too large , the yellow uploading line activates, the alert box does not show, and it continues in that state for several minutes if you let it.

 

 (I am not even sure that it is browser related, it may be individual machines and the browser configutration).  It does not seem to be version specific, we have tried this under IE7, IE8, and IE9.

 
Any ideas?

 
Thanks,
Gary

 

Peter Filipov
Telerik team
 answered on 13 Jul 2011
3 answers
120 views
I have a hierarchical grid with just a master table and a detail table.  I am allowing autocolumn creation when the datasource is bound.  As the columns are created I need to selectively hide and format some of them.  I do this in the ColumnCreated procedure using a GridBoundColumn variable to reference each column in turn.  The problem is that I can't find a way to identify whether a column is in the master table or the detail table to determine what to do with it.  If all column names were unique this wouldn't be an issue but some of them aren't and they need to be seen on either the master record or the detail record, but not both.

Thanks for any help you can give me.
Mira
Telerik team
 answered on 13 Jul 2011
1 answer
387 views
Hello,

I have a database where the user may upload an alternative image for a device.
If the image is not present in the database, the datasource returns a DBNull and the binary image should show the standard image file from the servers image directory.
I used this code which works fine if the image is not present.

<telerik:RadBinaryImage ID="RadBinaryImage1" runat="server"
   DataValue='<%# Eval("Data") is DBNull ? null : Eval("Data")%> '
  
AlternateText=" " AutoAdjustImageControlSize="true" 
   ImageUrl='<%# Eval("Type", "~/Images/Devices/{0}_sml.png") %>'
  
Width="64px" Height="64px" ImageAlign="Middle" ResizeMode="Fit" />

If the database returns the image I get this error message during the page creation:
"Cannot set image Url if DataValue is already set"

If I remove the ImageUrl property, the image of the database is shown properly. So it's surely not a corrupted image file.
I am currently using the following workaround:
<telerik:RadBinaryImage ID="DeviceBinaryImage" runat="server"
    DataValue='<%# Eval("Data") is DBNull ? null : Eval("Data")%> '
   
AlternateText=" " AutoAdjustImageControlSize="true"
    Visible='<%# Eval("Data") is DBNull ? false : true %>'
   
Width="64px" Height="64px" ImageAlign="Middle" ResizeMode="Fit" />
 <asp:Image ID="Image1" runat="server" 
        ImageUrl='<%# Eval("Type", "~/Images/Devices/{0}_sml.png") %>' 
    Visible='<%# Eval("Data") is DBNull ? true : false %>' />

Is it possible to set DataValue and the alternative ImageUrl Property of a single RadBinaryImage?
I would expect the RadBinaryImage to ignore the ImageUrl if DataValue has data.


UPDATE
Forget about the thread.
Simply swapping the order of ImageUrl and DataValue did the trick. :)



Mira
Telerik team
 answered on 13 Jul 2011
7 answers
110 views
Hello,

I have a problem in Internet Explorer when I add a ribbonbar in RadSlidingZone as you can see on the attached file. With Firefox or Chrome, it works well.

I used the same ribbonbar like in your website
http://demos.telerik.com/aspnet-ajax/ribbonbar/examples/default/defaultcs.aspx

There are three tabs defined in the ribbonbar.

Have you any idea about this?

Thank you,

André
Simon
Telerik team
 answered on 13 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?