Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
Hey everyone,
I am currently struggling with getting my grids to resize as a user expands and contracts their browser window. Here's my current situation:
1. For each page I reference a nested master page (each of the 2 master pages has all containers set to 100% for height and width)
2. Some pages only have grids where I set the <MasterTableView> dimensions to 100% instead of the actual RadGrid dimensions.
3. Some pages require RadSplitters with a Tree on the left and Grid on the right.

Summary:
Basically I have figured out how to get the grid to expand in height but the header row grows with the other rows. Ideally I would be able to continue to show grid rows instead of just making the existing ones larger.

Also, my master pages use tables as containers and with my limited CSS experience I was wondering if I shouldn't be and instead use some other method?

I am not sure if this is even worth it at this point. I have not seen one example of a grid doing this outside of a splitterbar. (I found that example)

Any assistance would be greatly appreciated.
J.
Pavlina
Telerik team
 answered on 09 Dec 2009
1 answer
145 views

Hello,
We are implementing some custom filtering on rad grid.
We are doing it in a similar approach to the example provided here:
http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html
As in the example, we are handling the Itemcommand event, and in that apply our own custom filtering behavior.

We are looking for a better technique to extract the current filter value from the column we are working on.
Inside the item command event, we execute the following line in order to extract the filter value from the column:

TextBox filterBox = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0] as TextBox;   

isn't there a better way? this is wspecially important when we have different column types with different filtering controls. for example, if I have a radComboBox instead of a textbox..

I saw there is a property called CurrentFilterValue for the column, but it shows the old filter value, and is not relevant in the Itemcommand event.

Any suggestions?

Pavlina
Telerik team
 answered on 09 Dec 2009
2 answers
128 views
We are using the latest Q3 hotfix release but are noticing some strange behaviour when moving columns and then filtering. If we drag a column before another, then enter some criteria in the moved column, the resulting (posted back) page has the criteria in the filter boxes for both columns.

Is anyone else experiencing this or aware of the problem?

Thanks.
Tsvetoslav
Telerik team
 answered on 09 Dec 2009
1 answer
190 views
Hello all ,

 My menu appears some thing odd to the page ..:(  i wish to reduce the height of my menu how can i do that in css ??  please find the attached image , will help u out .

Thanks
Prince
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
235 views

Hi, I am developing a Webpage where I have RadGrid for multiple Products Entry.

It has Product Name, Quantity, UnitPrice and Total Price Fields.

User can keep adding products, quantity, UnitPrice and also can change any of the existing quantity, unitprice.

Total Price should always be calculated automatically as Quantity * Unit Price, upon any change on Quantity TextBox or UnitPrice Textbox.

I also have one more Server Label where I display Total of Total Price.


Now what I am looking for is a JavaScript Function to calculate all the Rows Quantity * its Unit Price and display it to its Total Price. And total of the Total price ( of all the rows ) should be displayed to the server side Label.

Can someone please help me for this JavaScript function? I think I can attach it to the ItemTemplate's Controls while binding Grid so that if there is any change in that Control Values, It should always calculate Total of All the Rows of Grid.


Here is my Grid: In the given code,

  • I always want to calculate lblTotalCost Value to be txtQty  * txtUnitCost. And total of all the Rows lblTotalCost Value should be displayed in lblSubTotal.Text. These values should be changed always when user enters or changes any value in txtQty or txtUnitCost. It should always recalculate all the total upon any change in any rows quantity or unit cost value.
  • In the Footer Template, lblFooterTotalCost should always be calculated when entered txtEnterQty  * txtEnterUnitCost

#############################################################

<telerik:RadGrid ID="RadGridDetails" runat="server" AllowPaging="false"      
AllowSorting="true" AutoGenerateColumns="False" GridLines="Both"      
OnNeedDataSource="RadGridDetails_needdatasource" Skin="Default"    
OnItemCreated="RadGridDetails_ItemCreated"      
OnItemDataBound="RadGridDetails_ItemDataBound"    
ShowFooter="true"    
 
>     
<PagerStyle Mode="NextPrevAndNumeric" />     
<ClientSettings EnableRowHoverStyle="true">     
 
</ClientSettings>     
                                        <MasterTableView ShowHeadersWhenNoRecords="true">     
                                            <Columns>     
    
    
                                                <telerik:GridTemplateColumn >     
                                                    <ItemTemplate>     
                                                        <asp:Button runat="server" ID="btnDeleteProduct" text="Delete"      
                                                            CssClass="ButtonCSS"    
                                                            ToolTip="Click here to delete this product"    
                                                            CausesValidation="true"      
                                                            OnClientClick="javascript:return confirm('Are you sure you want to delete this Product Information? ');"    
                                                            onclick="btnDeleteProduct_Click"      
                                                            CommandArgument='<%#      
                                                            Eval ( "RequestInfoProductDetailID").ToString()      
                                                            + ";" +       
                                                            Eval ( "Row_Number").ToString()     
                                                            %>'     
                                                            />     
                                                    </ItemTemplate>     
                                                    <FooterTemplate>     
                                                        <asp:Button runat="server" ID="btnAddProduct" text="Add New Product"      
                                                            CssClass="ButtonCSS"    
                                                            ToolTip="Click here to add this new product to the list"    
                                                            CausesValidation="true" onclick="btnAddProduct_Click"      
                                                            />     
                                                    </FooterTemplate>     
                                                </telerik:GridTemplateColumn>           
    
    
    
                                                <telerik:GridTemplateColumn HeaderText="Quantity" UniqueName="Quantity">     
                                                    <ItemTemplate>     
                                                        <asp:TextBox ID="txtQty" Runat="server" MaxLength="7"      
                                                            Text='<%# Bind("Quantity") %>'      
                                                            ToolTip="Enter quantity"      
                                                            ></asp:TextBox>     
                                                                    <asp:CompareValidator ID="cvQty" runat="server"      
                                                                    Display="Dynamic" ErrorMessage="Please enter a valid quantity"      
                                                                    ControlToValidate="txtQty"  Operator="DataTypeCheck"       
                                                                    Type="Integer" ></asp:CompareValidator>     
                                                    </ItemTemplate>     
                                                    <FooterTemplate>     
                                                        <asp:TextBox ID="txtEnterQty" Runat="server" MaxLength="7"      
                                                            ToolTip="Enter quantity"      
                                                            ></asp:TextBox>     
                                                                    <asp:CompareValidator ID="cvEnterQty" runat="server"      
                                                                    Display="Dynamic" ErrorMessage="Please enter a valid quantity"      
                                                                    ControlToValidate="txtEnterQty"  Operator="DataTypeCheck"       
                                                                    Type="Integer" ></asp:CompareValidator>     
                                                    </FooterTemplate>     
                                                </telerik:GridTemplateColumn>           
                                                                               
                                                <telerik:GridTemplateColumn HeaderText="Product Name" SortExpression="ProductName"      
                                                    UniqueName="ProductName">     
                                                    <ItemTemplate>     
                                                        <asp:TextBox ID="txtProductName" Runat="server" MaxLength="50"      
                                                            Text='<%# Bind("ProductName") %>'      
                                                            ToolTip="Enter ProductName"      
                                                            ></asp:TextBox>                                         
                                                    </ItemTemplate>     
                                                    <FooterTemplate>     
                                                        <asp:TextBox ID="txtEnterProductName" Runat="server" MaxLength="50"      
                                                            ToolTip="Enter ProductName"      
                                                            ></asp:TextBox>                                         
                                                    </FooterTemplate>     
                                                </telerik:GridTemplateColumn>     
    
    
    
                                                <telerik:GridTemplateColumn HeaderText="Unit Cost"  SortExpression="UnitCost" UniqueName="UnitCost">     
                                                    <ItemTemplate>     
                                                        <asp:TextBox ID="txtUnitCost" Runat="server" MaxLength="10"      
                                                            Text='<%# Bind("UnitCost") %>'      
                                                            ToolTip="Enter Unit Cost"      
                                                            ></asp:TextBox>     
                                                                    <asp:CompareValidator ID="cvUnitCost" runat="server"      
                                                                    Display="Dynamic" ErrorMessage="Please enter a valid amount"      
                                                                    ControlToValidate="txtUnitCost"  Operator="DataTypeCheck"       
                                                                    Type="Double" ></asp:CompareValidator>     
                                                    </ItemTemplate>     
                                                    <FooterTemplate>     
                                                        <asp:TextBox ID="txtEnterUnitCost" Runat="server" MaxLength="10"      
                                                            ToolTip="Enter Unit Cost"      
                                                            ></asp:TextBox>     
                                                                    <asp:CompareValidator ID="cvEnterUnitCost" runat="server"      
                                                                    Display="Dynamic" ErrorMessage="Please enter a valid amount"      
                                                                    ControlToValidate="txtEnterUnitCost"  Operator="DataTypeCheck"       
                                                                    Type="Double" ></asp:CompareValidator>     
                                                    </FooterTemplate>     
                                                </telerik:GridTemplateColumn>           
    
                                                <telerik:GridTemplateColumn HeaderText="Total Cost"       
                                                    SortExpression="TotalCost"      
                                                    UniqueName="TotalCost">     
                                                    <ItemTemplate>     
                                                        <asp:Label runat="server" ID="lblTotalCost" Text='<%# Bind("TotalCost") %>' ></asp:Label>     
                                                    </ItemTemplate>     
                                                    <FooterTemplate>     
                                                        <asp:Label runat="server" ID="lblFooterTotalCost" ></asp:Label>     
                                                    </FooterTemplate>     
                                                </telerik:GridTemplateColumn>           
    
                                            </Columns>     
                                            <EditFormSettings>     
                                                <PopUpSettings ScrollBars="None" />     
                                            </EditFormSettings>     
                                            <ExpandCollapseColumn Resizable="False" Visible="False">     
                                                <HeaderStyle />     
                                            </ExpandCollapseColumn>     
                                            <RowIndicatorColumn Visible="False">     
                                                <HeaderStyle />     
                                            </RowIndicatorColumn>     
                                        </MasterTableView>     
                                    </telerik:RadGrid>      
    
    
    
    
<asp:Label ID="lblSubTotal" runat="server" ></asp:Label>    
 


#############################################################

Tsvetoslav
Telerik team
 answered on 09 Dec 2009
5 answers
223 views
When i place a RadGrid in an ajax panel, the RadGrid grays out and the spinny icon shows overtop the center of the RadGrid.  This is an excellent effect which i use often in my websites.

On my current website, I have tried to do the same thing with a RadChart, with some unexpected behavior.  When I place the RadChart in an ajax panel, the RadChart does not gray out and the spinny icon shows up at the top of the RadChart, BEHIND the title.  Note the little blue semicircle in the attached picture for reference.

How can i acheive the nice effect i get with the RadGrid when i use the RadChart?

P.S.>
I have the BackgroundPosition set to Center and the RadChart is WITHIN the ajax panel.
JD Plagianis
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
65 views
Hi,

I am using Q2 2009.  I have grid.and there are Two Arrows button Right and left .I want to do the following functionality

When these arrows are clicked, the data grid should move 3 cells to the right or left accordingly

Please give me the solutions ASAP.

Regards

Rahul
Pavlina
Telerik team
 answered on 09 Dec 2009
2 answers
136 views
Hello,

I have the following scenario at my application:

  • Columns are auto-generated, I don't know which columns I will get at design time.
  • I should display cell contents in max two rows.
  • If cell content doesn't fit on two rows I have to get a shorter version of the cell content and also add an ellipsis script to expand/collapse the content.

I have been reading RadGrid documentation related to grid formatting from client side and as far as I've seen I should use OnGridCreating and OnGridCreated client events to do it.

Everything works OK formatting my cell's content from one of those events except that the user is able to see the grid before I apply any format and a few milliseconds later the formatted version. This flickering effect the user sees is very annoying specially when the contents of the grid are very large.

Is there any way to format cell's content at client side BEFORE the grid is displayed?

Thanks ahead,

Maria Henao
Maria
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
96 views
I have the need to be able to launch the edit form of the scheduler from a control other than the scheduler itself (a button in this case).

The code below retrieves the appointment, etc... and all of it works perfectly in the debugger. I thought all I needed to call was editappointment, but the advedit template is never shown and the code behind method (form created, etc...) are never hit.

What am I doing that is so painfully wrong that I cannot see it? :)

                function Huh(sender, e) {  
                      
                    // Find the scheduler  
                    var rsScheduler = $find('ctl00_ContentPlaceHolder1_rsScheduler');  
 
                    // Get the variable for the active lease  
                    var nActiveLeaseID = document.getElementById("ctl00_ContentPlaceHolder1_m_nActiveLease");  
 
                    // Get the appointments from the schduler  
                    var Appointments = rsScheduler.get_appointments();  
 
                    // Get our appointment  
                    var MyAppt = Appointments.findByID(nActiveLeaseID.value);  
                      
                    //Edit the appointment  
                    rsScheduler.editAppointment(MyAppt);  
                } 
Veselin Vasilev
Telerik team
 answered on 09 Dec 2009
1 answer
61 views
if I set skin to Telerik, menu divider does show up.

but if I set skin to Web20, menu divider is no show, even I have 

<telerik:RadMenuItem IsSeparator="true" Text="|" />

please help and let me know what I need to do to make the divider appear.  thanks.

 

 

 

 

Kamen Bundev
Telerik team
 answered on 09 Dec 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?