Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
350 views
Hello,

Is there a way to include parameters from Javascript to be sent to a custom AsyncUploadHandler?

Such parameter could be a folder selected in the page.

I tried to change the url by setting the ctrl.
_handlerUrl attribute from various events. Does not work, the params are removed before they get to the handler.

Creating cookies might work but are no solution in my case.

I am wondering if I am the only person needing such a thing...? Please help!

Thanks,
Stephan


PS: There seems to be a bug when setting a handler url on server side with query string parameters. These parameters are then properly passed to the handler, however, the control adds a "?type=rau". It should of course have added "&type=rau".


Plamen
Telerik team
 answered on 20 Apr 2017
18 answers
1.2K+ views
I see there are a ton of messages about column widths with static headers, and I think I've gone through all of them and tried all of the tricks to get the column headers to be the correct width, but so far nothing has worked for me.  I have a radgrid in a tooltip (not sure if that matters, this seems to happen anywhere I use a radgrid) and have it set to UseStaticHeaders="True".  I have the MasterTable layout set to "Fixed", and have all of the column widths specified, header and item.  The column widths for the header DO NOT match the item widths.  The item widths are correct.  I have tried setting the layout to Auto and removing all of the column widths, same result.  I am calling the client-side "repaint" method, no change.  I'm really not sure what to do at this point.  I'll attach a screenshot of what I get, but here's the code I am using in the aspx:
<telerik:RadGrid ID="radGridAssociates" EnableViewState="True" runat="server" AllowSorting="false"
    AutoGenerateColumns="false" Skin="Web20" EnableTheming="True"
    ClientSettings-EnableRowHoverStyle="True" EnableEmbeddedSkins="True"
    OnItemDataBound="RadGridAssociatesItemDataBound" Width="548px" Height="290px"
    OnNeedDataSource="RadGridAssociatesNeedDataSource">
    <ClientSettings AllowColumnsReorder="False" EnablePostBackOnRowClick="false" ClientEvents-OnRowSelected="usePopup">
        <Resizing AllowColumnResize="True" EnableRealTimeResize="True" />
        <Selecting AllowRowSelect="True" />
        <Scrolling  AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" />
    </ClientSettings>       
    <MasterTableView DataKeyNames="Xref" ClientDataKeyNames="Xref" ShowHeadersWhenNoRecords="false"
        EnableNoRecordsTemplate="true" TableLayout="Fixed" AlternatingItemStyle-Font-Size="11px">
        <ItemStyle HorizontalAlign="Center" Font-Size="11px" Width="548px"></ItemStyle>                       
        <NoRecordsTemplate>
            <div style="padding:5px; background:transparent; font-size:12px; text-align:left;">
                No associates found
            </div>
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridClientSelectColumn ButtonType="PushButton" Visible="False" CommandName="Select" Text="Select" UniqueName="column">
            </telerik:GridClientSelectColumn>
            <telerik:GridTemplateColumn HeaderText="PIC" UniqueName="colPic">
                <ItemStyle Width="30px"></ItemStyle>
                <HeaderStyle Font-Size="10px" Wrap="False" Width="30px"/>
                <ItemTemplate>
                        <img alt='photo' src='<%= GetConfig().imageUrl %>?x=<%# Eval("XREF") %>&s=small' width="30" height="38" style="border:0px;">
                    </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="FLAGS" UniqueName="colFlags">
                <ItemStyle Wrap="false" Font-Size="10px" Width="30px"></ItemStyle>
                <HeaderStyle Font-Size="10px" Wrap="False" Width="30px"/>
                <ItemTemplate>
                    <asp:Label ID="lblAlerts" CssClass="flags" runat="server"></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="NAME" UniqueName="colName" ItemStyle-HorizontalAlign="Left">
                <HeaderStyle Width="110px"></HeaderStyle>
                <ItemTemplate>
                        <%# Eval("LastName") + ", " + Eval("FirstName") + " " + Eval("MiddleName") %>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="S" DataField="Sex" UniqueName="colSex" HeaderTooltip="Sex">
                <HeaderStyle Width="6px" Wrap="False" />
                <ItemStyle Width="6px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="R" DataField="Race" UniqueName="colRace" HeaderTooltip="Race">
                <HeaderStyle Width="7px" Wrap="False" />
                <ItemStyle Width="7px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="HGT" DataField="Height" UniqueName="colHeight" HeaderTooltip="Height">
                <HeaderStyle Width="12px" Wrap="False" />
                <ItemStyle Width="12px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="WGT" DataField="Weight" UniqueName="colWeight" HeaderTooltip="Weight">
                <HeaderStyle Width="14px" Wrap="False" />
                <ItemStyle Width="14px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="AGE" DataField="Age" UniqueName="colAge" HeaderTooltip="Age">
                <HeaderStyle Width="12px" Wrap="False" />
                <ItemStyle Width="12px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="DOB" DataField="Dob" DataFormatString="{0:d}" UniqueName="colDob" HeaderTooltip="DOB">
                <HeaderStyle Width="48px" Wrap="False" />
                <ItemStyle Width="48px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="XREF" DataField="Xref" UniqueName="colXref" HeaderTooltip="XREF">
                <HeaderStyle Width="36px" Wrap="False" />
                <ItemStyle Width="36px" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="MATCHES" DataField="AssociatesMatchCount" UniqueName="colMatchCount">
                <HeaderStyle Width="48px" Wrap="False" />
                <ItemStyle Width="48px" Wrap="False" />
            </telerik:GridBoundColumn>
        </Columns>
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Resizable="False" Visible="False">
        </ExpandCollapseColumn>
        <EditFormSettings>
            <PopUpSettings ScrollBars="None" />
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

I've also tried setting the MasterTable width to the same width as the RadGrid (548px), and setting it to 95%, which was another suggestion.  None of these fixes have worked for me.  Any help is appreciated!

Thanks,
Eddie
Tim Black
Top achievements
Rank 1
 answered on 19 Apr 2017
20 answers
364 views
How to get TaskID of selected task?

I have seen that there is no event in Teletik RadGantt control.
Mike
Top achievements
Rank 1
 answered on 19 Apr 2017
11 answers
1.4K+ views
Hi,

I am using radasyncupload customhttphandler in my application, i want to compress or resize images before uploading to server.

Onfileselect method is also not provide the complete path of image, so we can resize image using javascript and then upload to server.


Please provide possible options by which we can compress and reduce image before uploading to server.

Vessy
Telerik team
 answered on 19 Apr 2017
0 answers
60 views

Hi mates,

I have a Telerik RadGrid with a DetailsTable, and the following CommandItemTemplate is in this DetailsTable:
<CommandItemTemplate>
< asp:LinkButton ID="btnNuevoAperitivoFrioIng" runat="server" ForeColor="#384e73" OnClick="btnNuevoAperitivoFrioIng_Click" ><img style="border:0px;vertical-align:middle; height:24px; width:24px" alt="" src="../img/buttons/add.png"/>Nuevo</asp:LinkButton>
< /CommandItemTemplate> 
I need to get the ID of the expanded parent row when I clic on btnNuevoAperitivoFrioIng (in the btnNuevoAperitivoFrioIng_Click function). How could I get this ID, please?

Thanks a lot in advance.

Cheers.

David Ortega

davortsan
Top achievements
Rank 1
 asked on 19 Apr 2017
0 answers
70 views
Get

Hi mates,

I have a Telerik RadGrid with a DetailsTable, and the following CommandItemTemplate is in this DetailsTable:

<CommandItemTemplate>
<asp:LinkButton ID="btnNuevoAperitivoFrioIng" runat="server" ForeColor="#384e73" OnClick="btnNuevoAperitivoFrioIng_Click" ><img style="border:0px;vertical-align:middle; height:24px; width:24px" alt="" src="../img/buttons/add.png"/>Nuevo</asp:LinkButton>
</CommandItemTemplate> 

I need to get the ID of the expanded parent row when I clic on btnNuevoAperitivoFrioIng (in the btnNuevoAperitivoFrioIng_Click function). How could I get this ID, please?

Thanks a lot in advance.

Cheers.

David Ortega
                                                       

davortsan
Top achievements
Rank 1
 asked on 19 Apr 2017
3 answers
479 views

Hi

I am exporting a radgrid to pdf and setting the background colour of alternate lines as light grey, font and font size for cells and footer in the item created event, and all is working as it should.

However I would like to change the text color or background color of a column based on the value of another column but I am not sure in which event I should do this while exporting to pdf. I tried the RadGrid1_ItemDataBound event but it has no effect on the pdf output. 

Can you point me in the right direction?

Thanks

 

 

Eyup
Telerik team
 answered on 19 Apr 2017
1 answer
76 views
How do I set the ajaxmanager to ajax refresh a grid based on a button in the CommandItemTemplate since the button does not show up as a control in the ajaxmanager configuration wizard?
Eyup
Telerik team
 answered on 19 Apr 2017
8 answers
377 views
i am facing issue, when trying to disable the drag and drop in radEditor. i refered the following Code. but it is not working for any browser. http://www.telerik.com/community/forums/aspnet-ajax/editor/disable-images-drag-and-drop.aspx
BRowsers : IE 9, Firefox 11, and Chrome.

<telerik:RadEditor ID="txtsomeID" runat="server" Width="100%" AutoResizeHeight="false"
Height="300px" TabIndex="1" StripFormattingOnPaste="All" EnableResize="false"
OnClientLoad="OnClientLoad" OnClientSubmit="OnClientSubmit">
<Content></Content>
<ContextMenus>
<telerik:EditorContextMenu Enabled="false" />
<telerik:EditorContextMenu TagName="IMG" Enabled="false" />
<telerik:EditorContextMenu TagName="TABLE" Enabled="false" />
</ContextMenus>
</telerik:RadEditor>

and the Java scrtipt  and even OnClientLoad is not Firing at all
<script type="text/javascript>
function OnClientLoad(editor, args) {
          var element = document.all ? editor.get_document().body : editor.get_document();
          var eventHandler = document.all ? "drop" : "dragstart";
          var selElem = editor.getSelectedElement();
          $telerik.addExternalHandler(element, eventHandler, function(e) { $telerik.cancelRawEvent(e); return false; });
      }
 
      function OnClientSubmit(editor) {
          editor.fire("FormatStripper", { value: "ALL" });
      }
</script>
harshini
Top achievements
Rank 1
 answered on 19 Apr 2017
0 answers
94 views

Hi,

I've been experiencing a problem with RadPivotGrid for a  while now and the problem is when you zoom in (or out) a page that contains radpivotgrid, row alignment is gone and as you see in the attached screenshot, the problem exists even in product demos.

this also happens occasionally without even zooming, specially on slow connections rows are not aligned with their headers properly.

Is there a fix for it? Is there a client side method that can realign rows?

Please help.

Thanks

Ahmad
Top achievements
Rank 1
 asked on 19 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?