Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
206 views
I have a user on IE6 that is complaining of an intermittent problem with the slider.  When the page loads the slider doesn't render correctly nor does it work.  She must refresh her page and then it will usually reset itself.

If you open the image below, you will see an example of the issue.  There are two red arrows on the screenshot.  The leftmost points to the slider button which is shifted to the left of the slider.  The rightmost points to where the slider is supposed to display.  You can see the two arrow pagers on the left and right of the slider, but no bar where the slider bar should be.

http://imagehost.bigwavesoftware.net/sliderissue.png

Has this been seen or addressed before?

Thanks,
John
Tsvetie
Telerik team
 answered on 30 Jun 2009
1 answer
43 views

Is there a way to define a default width for an input control (CssClass) so that it can be overwritten inline via the controls width parameter?

Thanks,
Rich

Dimo
Telerik team
 answered on 30 Jun 2009
1 answer
186 views
Hi,


I am having a grid  I wish to have static headers  to display.
so, i have added  following under client settings
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="500px"   />

Now i also wanted to have horizontal  scroll bars  so i kept the grid in a div

<div style="width:1024px; overflow-x:scroll">
My grid here
<div>

The problem is that it shows two Horizontal scroll bars in IE,
And in  FF  only one horizontal  scroll bar is shown, but it does not show the whole grid, and right most part is not shown even after scrolling to most right.

Please Help..

Also, can't we set the  scroll width   just like we had set ScrollHeight in above.

Thanks,
Avi
Dimo
Telerik team
 answered on 30 Jun 2009
6 answers
697 views
I have a need to create a pdf file for a selected row in a grid which I then download to the client pc. I have the pdf creation working fine in code behind. I've got it triggered from a button on the command row. The button click downloads a pdf file based on the selected row in the grid. The grid is ajaxified using a RadAjaxPanel and, in order to perform the pdf file download, I disable the ajax call on click of the button, and then do a Response.BinaryWrite(pdfBytes) of the pdf data, which basically is then doing a regular postback. I get the pdf file transfered correctly to the client pc with a save as/open diaglog box.

Now I want to do the same thing but from a button in each row of the grid. I have a grid with a standard linq datasource. I have a gridbuttoncolumn with an imagebutton which has a command of Print. I've hooked the client OnCommand to some javascript to cancel the ajax call. I've hooked the server side OnItemCommand to a c# handler and everything fires ok.

My problem is that the e.item.itemIndex value is always zero regardless of what row button I click. All my row data seems to be in place because inside the OnItemCommand if I supply a hard coded index to a GetDataKeyValues, I get the data key correctly. Here are the two samples. The first only ever gives me the data key of item zero because e.Item.ItemIndex is always 0.

protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Print") 
        { 
            int letterId = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LetterId"];   
            CreatePDF(letterId); 
        } 
    }  

This one proves the data is there because I get the key value for the 7th row (indexed from 0).
protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Print") 
        { 
            int letterId = (int)e.Item.OwnerTableView.DataKeyValues[6]["LetterId"];   
            CreatePDF(letterId); 
        } 
    }  


Why is my ItemIndex always Zero?

Thanks,
Steve (pulling my hair out...)





btw. Here's some code extracted from my app to give you more context.

aspx.
<Telerik:RadAjaxPanel ID="RadAjaxPanelLetters" runat="server" LoadingPanelID="RadAjaxLoadingPanel2" ClientEvents-OnRequestStart="onRequestStartLetters"> 
<telerik:RadGrid ID="RadGridLetters" runat="server" GridLines="None" EnableEmbeddedSkins="false" Skin="RealMax" 
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="true"  
        DataSourceID="LinqDS_Letters" OnItemCommand="RadGridLetters_ItemCommand"  
        AllowPaging="True" AllowSorting="True" EnableHeaderContextMenu="True" 
        AllowFilteringByColumn="True" > 
    <ClientSettings EnableRowHoverStyle="true" > 
        <ClientEvents OnRowContextMenu="RowContextMenu" OnRowMouseOut="rowMouseOut" OnRowMouseOver="rowMouseOver" OnPopUpShowing="PopUpCentered" OnCommand="GridCommand" ></ClientEvents> 
        <Selecting AllowRowSelect="true" /> 
    </ClientSettings> 
    <HeaderContextMenu Skin="Office2007" EnableTheming="True"> 
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </HeaderContextMenu> 
 
    <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="false" /> 
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top"  
            DataKeyNames="LetterId" DataSourceID="LinqDS_Letters" EditMode="EditForms"> 
    <RowIndicatorColumn> 
        <HeaderStyle Width="20px"></HeaderStyle> 
    </RowIndicatorColumn> 
    <ExpandCollapseColumn> 
        <HeaderStyle Width="20px"></HeaderStyle> 
    </ExpandCollapseColumn> 
    <ItemStyle CssClass="RowMouseOut" /> 
    <AlternatingItemStyle CssClass="RowMouseOut" /> 
    <Columns> 
        <telerik:GridEditCommandColumn EditImageUrl="~/Images/Buttons/edit.gif"  
            ButtonType="ImageButton" CancelImageUrl="~/Images/Buttons/cancel.png"  
            Resizable="False"> 
            <HeaderStyle Width="16px" /> 
            <ItemStyle CssClass="CommandColumn" /> 
        </telerik:GridEditCommandColumn> 
        <Telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Buttons/printer.png" Text="Print" CommandName="Print" > 
            <HeaderStyle Width="16px" /> 
            <ItemStyle CssClass="CommandColumn" /> 
        </Telerik:GridButtonColumn> 
 
... etc 

javascript:
var cancelAjaxLetters = false; 
 
function GridCommand(sender, args) { 
        if (args.get_commandName() == "Print") cancelAjaxLetters = true; 
    } 
 
function onRequestStartLetters(ajaxManager, eventArgs) { 
    if (cancelAjaxLetters) { 
        //alert("disabling Ajax"); 
        eventArgs.EnableAjax = false; 
    } 
 
    cancelAjaxLetters = false; 
} 

c#
 protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Print") 
        { 
            int letterId = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LetterId"];   
            CreatePDF(letterId); 
        } 
    }  






nestur
Top achievements
Rank 1
 answered on 30 Jun 2009
3 answers
287 views
Hi!

My problem is that when I have a wide control (for example a TextBox that is 500px wide) in the CommandItemTemplate then the width of the ExpandColumn will increase.

There is changed behaviour in Q1 2009 making the expand column width to be dependent on content of CommandItemTemplate.

Does anyone have a clue how to set a fixed size for the ExpandColumn in this case? I have tried to set width property in css for rgExpandCol but it does not work for me.

Thanks
/Mats
Dimo
Telerik team
 answered on 30 Jun 2009
2 answers
193 views
I've been working at this and can't seem to come up with a way to make it work.

I have a grid that designates specific rows as having errors.  On these rows, and these rows only, I want to display the Edit command to display an edit form template.

Here is my code behind for catching and identifying the bad records.  How can I tie into this to either set my edit command text to "Error..." or "" depending on if I want it to show or not.

[code]
protected void rgridOrders_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                bool _isError = Convert.ToBoolean(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IsError"].ToString());
                if (_isError)
                {
                    GridItem dataItem = e.Item;
                    dataItem.BackColor = System.Drawing.Color.FromArgb(255, 220, 220);
                    dataItem.ForeColor = System.Drawing.Color.Red;
                }
            }
        }
[/code]


Carl
Top achievements
Rank 1
 answered on 30 Jun 2009
3 answers
152 views
Hi ,
       I am using Radslider in a page where  I am displaying the various colors in single row by putting the table inside the the division tag and the colors are dynamically displayed from the data stored in database .Navigation was done using Rad slider.Rad Slider disappears in Firefox when the page is refreshed It works just fine in IE6.OnClientLoaded function is not fired when the page is refreshed Can some one help me to fix it.

Thanks and Regards,
N.Nallamani
Tsvetie
Telerik team
 answered on 30 Jun 2009
1 answer
193 views
Hi all.

     Is it possible to set our customized papersize
       pdf export: hard the page size 14/8.5(fan fold)


Plz guide me in case any option found..

Appu

Daniel
Telerik team
 answered on 30 Jun 2009
2 answers
82 views
Hi,

When I click "Add new record" I am getting an Exception as "System.InvalidCastException: Specified cast is not valid."
Kindly tell me a solution.

<MasterTableView EditMode="PopUp">
<
Columns> 
      .... 
 
      <telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="Is Active" /> 
 
      .... 
</Columns> 
<EditFormSettings EditFormType="Template" PopUpSettings-Modal="true"> 
    <FormTemplate> 
        ..... 

        <asp:CheckBox ID="CheckBox1" runat="server Checked='<%# Bind("IsActive") %>' /> 

        ..... 
    </FormTemplate> 
</EditFormSettings> 
</MasterTableView>

Regards,
Jones
Jones
Top achievements
Rank 1
 answered on 30 Jun 2009
5 answers
228 views

This Error "Cannot find a cell bound to column name 'goalname' " arises only when i insert "grdGoals.MasterTableView.HierarchyDefaultExpanded = true;" this statement in codebehind on click of Export to Excel.
Code:

 <telerik:RadGrid>   
 <MasterTableView Width="100%" Name="Master" HierarchyLoadMode="ServerBind" DataKeyNames="InvoiceId"   
HorizontalAlign="NotSet" CommandItemDisplay="Top">   
 <DetailTables>   
<telerik:GridTableView Name="Detail" BackColor="White" AllowNaturalSort="true" runat="server"   
DataKeyNames="invoiceidfkid" Width="100%">   
<ParentTableRelation>   
<telerik:GridRelationFields MasterKeyField="InvoiceId" DetailKeyField="invoiceidfkid">   
</telerik:GridRelationFields>   
</ParentTableRelation>   
<Columns>   
 <telerik:GridBoundColumn HeaderText="invoiceidfkid" DataField="invoiceidfkid" Display="false"   
SortExpression="invoiceidfkid" UniqueName="invoiceidfkid">   
</telerik:GridBoundColumn>   
</Columns>   
</telerik:GridTableView>   
</DetailTables>   
<Columns>   
<telerik:GridBoundColumn HeaderText="InvoiceId" Display="false" DataField="InvoiceId" SortExpression="InvoiceId"   
UniqueName="InvoiceId">   
<ItemStyle Width="0%" />   
<HeaderStyle ForeColor="Black" HorizontalAlign="Center" />   
</telerik:GridBoundColumn>   
</MasterTableView>   
 </telerik:RadGrid>  
Pavlina
Telerik team
 answered on 30 Jun 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?