Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
318 views
What is the recommended approach to converting the contents of a Grid cell to Proper Case using the vb.net command strConvert( <string> , VbStrConv.ProperCase)? Is it possible to do this in the code-behind page? In this case the column is GridBoundColumn.

Thanks,
Dave
Dave
Top achievements
Rank 1
 answered on 06 Dec 2012
1 answer
152 views
I am recently implementing the RadGrid to show the Payment Bills , together with "DetailTable" to show details of the Payment Bill such as Items Bought , Quantity, Price and Discount .
When I collapse the detailTables, the command button in the "DetailTable" does not close. Would you please tell me whether there exist   the javascript statement to detect expand/collapse of the "DetailTable" ? How to detect the changes and apply to the attribute "visible" in order to achieve this?

The following is my code : 
<telerik:RadGrid ID="grdPayment" runat="server" AutoGenerateColumns="false" HeaderStyle-Font-Bold="true"
                            AllowMultiRowSelection="true" AllowAutomaticInserts="True" OnDetailTableDataBind="
grdPayment_DetailTableDataBind"
 
                            CssClass="RadGridCustomClass" OnNeedDataSource="
grdPayment_NeedDataSource" Width="98%">
 
 
                            <MasterTableView HierarchyLoadMode="Client"   AllowSorting="true" NoDetailRecordsText=""
                                CommandItemDisplay="TopAndBottom" EditMode="InPlace" DataKeyNames="PaymentItemID">
                                <CommandItemTemplate>
                                    <div style="padding: 5px 5px;">
                                        <telerik:RadButton ID="btnInsert" runat="server" CommandName="InitInsert" Visible='<%# !
grdHAGroup.
 
MasterTableView.IsItemInserted %>'
                                            Text="Add new">
                                            <Icon PrimaryIconUrl="~/Image/Button/add.gif" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                        </telerik:RadButton>
                                           
                                        <telerik:RadButton runat="server" Text="Save" ID="Button01" Visible='<%# !grdPayment.MasterTableView.IsItemInserted %>'>
                                            <Icon PrimaryIconUrl="~/Image/Button/save.gif" PrimaryIconLeft="8" PrimaryIconTop="4" />
                                        </telerik:RadButton>
                                           
                                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%#
grdPayment.EditIndexes.Count > 0 || grdPayment.MasterTableView.IsItemInserted %>'>
 
                                                            <img style="border:0px;vertical-align:middle;" alt="" src="~/Image/Button/cancel.gif" />Cancel editing
                                        </asp:LinkButton>  
                                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# grdPayment.MasterTableView.IsItemInserted %>'>
                                                            <img style="border:0px;vertical-align:middle;" alt="" src="~/Image/Button/yes.gif" /> Add this Bill No
                                        </asp:LinkButton>  
                                        <telerik:RadButton runat="server" Text="Delete selected Bill No(s)" ID="RadButton5"
                                            Visible='<%# !grdPayment.MasterTableView.IsItemInserted %>' OnClientClick="javascript:return confirm('Delete all selected customers?')"
                                            CommandName="DeleteSelected">
                                            <Icon PrimaryIconUrl="~/Image/Button/remove.gif" PrimaryIconLeft="8" PrimaryIconTop="4" />
                                        </telerik:RadButton>
                                           
                                    </div>
                                </CommandItemTemplate>
                                <Columns>
                                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
                                    <telerik:GridTemplateColumn UniqueName="CostCentreDisplyID" HeaderText="Bill No.">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCostCentreID" runat="server" Text='<%# Eval("BillNo") %>' />
                                            <asp:TextBox ID="txtCostCentreID" runat="server" Text='<%# Bind("BillNo") %>' Width="95%"
                                                Style="display: none" />
                                        </ItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:TextBox ID="txtCostCentreID" runat="server" Width="95%" />
                                        </InsertItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="CostCentre" HeaderText="Description">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCostCentre" runat="server" Text='<%# Eval("BillDesp") %>' />
                                            <asp:TextBox ID="txtCostCentre" runat="server" Text='<%# Bind("BillDesp") %>' Width="95%"
                                                Style="display: none" />
                                        </ItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:TextBox ID="txtCostCentre" runat="server" Width="95%" />
                                        </InsertItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    
                                    <telerik:GridBoundColumn DataField="discount" HeaderText="Discount(%)" DataFormatString="{0:###,##0.###0}"
                                        UniqueName="discount">
                                        <ItemStyle HorizontalAlign="Right" />
                                        <HeaderStyle HorizontalAlign="Right" />
                                        <ItemStyle Width="50px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Amount" HeaderText="Certified Amount" DataFormatString="{0:###,##0.#0}"
                                        UniqueName="Amount">
                                        <ItemStyle HorizontalAlign="Right" />
                                        <HeaderStyle HorizontalAlign="Right" />
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <DetailTables>
                                    <telerik:GridTableView DataKeyNames="PaymentItemID" Name="ItemLevel" Width="100%"
                                        CommandItemDisplay="TopAndBottom" EditMode="InPlace" HierarchyLoadMode="ServerOnDemand">
                                        <HeaderStyle CssClass="MostInnerHeaderStyle" />
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px;">
                                              <telerik:RadButton ID="btnInsertDetail"
                                              runat="server" CommandName="InitDetailInsert"
                                                    Visible='<%#  !(Container as GridCommandItem).OwnerTableView.IsItemInserted %>' 
                                        Text="Add New Milestone#" >
                                            <Icon PrimaryIconUrl="~/Image/Button/add.gif" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                            </telerik:RadButton>  
                                              <telerik:RadButton ID="btnCancelDetail"
                                              runat="server" CommandName="InitDetailCancel"
                                                  Visible='<%# grdPayment.EditIndexes.Count > 0 || (Container as GridCommandItem).OwnerTableView.IsItemInserted %>'
                                        Text="Cancel editing" >
                                            <Icon PrimaryIconUrl="~/Image/Button/cancel.gif" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                            </telerik:RadButton>  
                                              <telerik:RadButton ID="btnPerformInsertNewDetail"
                                              runat="server" CommandName="PerformInsertDetail"
                                             Visible='<%# (Container as GridCommandItem).OwnerTableView.IsItemInserted %>'
                                        Text="Add this Record" >
                                            <Icon PrimaryIconUrl="~/Image/Button/add.gif" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                            </telerik:RadButton>  
                                              <telerik:RadButton ID="btnDeleteDetails"
                                              runat="server" CommandName="InitDetailDelete"
                                                    OnClientClick="javascript:return confirm('Delete all selected customers?')"
                                                    Visible='<%#  !(Container as GridCommandItem).OwnerTableView.IsItemInserted %>'
                                        Text="Delete selected Milestone#" >
                                            <Icon PrimaryIconUrl="~/Image/Button/remove.gif" PrimaryIconLeft="4" PrimaryIconTop="4" />
                                            </telerik:RadButton>  
                                               
                                 
                                            </div>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                                <HeaderStyle Width="5%" />
                                                <ItemStyle Width="5%" />
                                            </telerik:GridClientSelectColumn>
                                            <telerik:GridTemplateColumn UniqueName="ItemNo" HeaderText="Item No.">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblMilestoneDisplyID" runat="server" Text='<%# Bind("ItemNo") %>' />
                                                    <asp:TextBox ID="txtMilestoneDisplyID" runat="server" Text='<%# Bind("ItemNo") %>'
                                                        Width="95%" Style="display: none" />
                                                </ItemTemplate>
                                                <InsertItemTemplate>
                                                    <asp:TextBox ID="txtMilestoneDisplyID" runat="server" Width="95%" />
                                                </InsertItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn UniqueName="ItemDesp" HeaderText="Description">
                                                <ItemTemplate>
                          
                                                    <asp:TextBox ID="tbxCostActivities" runat="server" Text='<%# Bind("ItemDesp") %>'
                                                        Width="95%" Style="display: none" />
                                                </ItemTemplate>
                                                <InsertItemTemplate>
                                                    <asp:TextBox ID="txtCostActivities" runat="server" Width="95%" />
                                                </InsertItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn DataField="Amount" HeaderText="Certified Amount" DataFormatString="{0:###,##0.#0}"
                                                UniqueName="Amount">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                        <ExpandCollapseColumn Visible="True"/>
                                    </telerik:GridTableView>
                                </DetailTables>
                            </MasterTableView>
                            <ClientSettings AllowExpandCollapse="false">
                                <Selecting AllowRowSelect="true" />
                               </ClientSettings>
                        </telerik:RadGrid>

Vasil
Telerik team
 answered on 06 Dec 2012
1 answer
48 views
Windows Surface RT Tablet a radlistbox doesn't allow selection the same way as on an ios device.

Via IOS, when I select items, it doesn't clear the other selections.  On Windows Surface RT, it does clear the previous selections, similar to a PC.  

Shouldn't the Windows Surface RT experience be the same as IOS?  Not the same as on a PC?

An asp:Listbox responds as I would expect on the Windows Surface RT, previous selections are not cleared with new selections.

Peter
Kate
Telerik team
 answered on 06 Dec 2012
3 answers
272 views
Hello,

I am new to using the telerik controls and need some input from the experts. I need suggestions on making the control go back and forth between the parent window and the opened rad window.

The scenario is as follows.

1. In the Parent window, i have a dropdown list. Based on the selection of the item, in the button click event, a dynamic radWindow is to be opened. -- was able to do it.
2. In the RadWindow, there is a "Save" button which causes some db transcations and the RadWindow is to be closed. -- was able to do it
3. The control should go back into the buttonclick event where the radWindow originated from or someother method in the parent page and continue from there. -- dont know how to come back to an event/method in the parent window.

How do i accomplish this. Is this feasible?. Please explain in detail. Thanks for your help in advance.

-Saleha.
Marin Bratanov
Telerik team
 answered on 06 Dec 2012
1 answer
113 views
Hi,

When the user writes text in the combobox, I need to check the inputted text against entries in the database and if the text is not found, I need to place a red wavy underline under the text as an indicator for the user that the inputted text is not correct. The red wavy underline I need is the exact one that is placed by the spellcheck. I am facing 2 problems:
- I am unable to figure out how to change the font of the text from the code behind. I tried looking through the properties of the combobox.Text but couldn't find anything.. I also tried combobox.underline = true but that did not result in any change on the webpage!
- Is it possible to place a red wavy underline or we can only place a regular straight line? If this is possible, how?

Any help much appreciated.

Thanks,
Samer
Kalina
Telerik team
 answered on 06 Dec 2012
6 answers
69 views
Hi, 

I have 2 questions regarding the grid

1. Same pager for master and detail
As you can see in attached picture I obtain 80 items for master table, which is correct behaviour and that pager looks correct... But when I click on the row, detail table is generated and there is the same pager for 80 items even if I have there only 4 rows obtained and displayed...  

I get data through "NeedDataSource"...

2. Display pager all the time
How can I display pager under any circumstances for the master table ? I have grid with page size equal to 10, but 8 rows are obtained and no pager is displayed. But I need it to display it because user may want sometimes change the pagesize. Is this any way how it can be done ?

Thanks for the reply...
FISCAL
Top achievements
Rank 1
 answered on 06 Dec 2012
3 answers
186 views
Hello,

Here is my setup:

I have a masterpage with a RadAjaxManager on it, and a content page with a RadAjaxManagerProxy on it.

The content page has 2 asp:panels (a master/detail type page) , the detail panel is hidden by default (and contains multiple rad editors)

Selecting a row from panel 1 will show panel 2 using the RadAjaxManagerProxy AjaxSettings. 

Panel 2 has some textboxes, and rad editors, and a save  and cancel  button. I am able to save no problem everything works. 

However when using MaxHtmlLength to validate the rad editors, clicking save will show the default Telerik javascript alert() and stop the page from posting, but it doesn't stop the loading panel from displaying. It just spins and wont stop until I refresh or close or whatever. It does not actually post to the server, it just seems to be in limbo land. 

Any suggestions? 

Thanks!
Leslie Huszar
Top achievements
Rank 1
 answered on 06 Dec 2012
1 answer
90 views
Is there any way to use the SendEmail control without specifying the SMTPServer, UserName or Password in the EmailSettings? We are using a service to send all of our emails that only exposes a Send method that takes in a System.Net.Mail.MailMessage. Unfortunately the SMTP server credentials are not exposed to the application that is using the share control.

Thanks,
Carl
Marin Bratanov
Telerik team
 answered on 06 Dec 2012
4 answers
104 views
Hi

Is it possible to have the secondary Y axis on the right hand side of the Chart as in the way the RadChart control works? 

I like the way the HTML Chart renders, but my customer does not like the second Y axis on the left also.

Regards
Mark
Danail Vasilev
Telerik team
 answered on 06 Dec 2012
2 answers
82 views
When I press 'x' to clean text area in ComboBox, file event parameter RadComboBoxItemsRequestedEventArgs has property Text not empty but with last value. Why?

Thanks.
Pls. Check Page Method on http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx 
Kalina
Telerik team
 answered on 06 Dec 2012
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?