Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
220 views
I use 1 button to open RadWindow,
after RadWindow show so scrollbar of browser scroll to top
how to fix problem scroll to top
based on my demo at: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid
thanks
sorry my bad english
Muhammad
Top achievements
Rank 1
 answered on 31 Jul 2012
1 answer
542 views
I am trying to update the border color of a RadTextBox using javascript.  The below snippit works great for the textbox in my datetimepickers but does not work for a radtextbox/radnumerictextbox:
DateTime.get_textBox().style.borderColor = "#FF0000";

This is the modified version that I am using with just the normal radtextbox:
TextBox.style.borderColor = "#FF0000";

Given that the get_textBox function is simply accessing the radtextbox component of the datetime picker should the same syntax not work on the straight radtextbox?

TIA




Shinu
Top achievements
Rank 2
 answered on 31 Jul 2012
1 answer
171 views
Hi,

The postion of a particular Radwindow must be on button. without hardcoding 'Left' & 'Top' values.Which event must be called to position the window effectively??
Princy
Top achievements
Rank 2
 answered on 31 Jul 2012
1 answer
64 views

All I'm really trying to do is populate three different comboboxes with the same item. When this code executes below only one combobox is getting the values. Any help is welcomed. Thanks!

for (int i = 0; i < 100; i++)
       
{
           
RadComboBoxItem li = new RadComboBoxItem();
            li
.Text = i.ToString();
            li
.Value = i.ToString();
           
InputPairThousandValueComboBox.Items.Add(li);
           
InputUsertThousdandValueComboBox.Items.Add(li);
           
InputCurrentlyListedThousdandComboBox.Items.Add(li);

       
}
Princy
Top achievements
Rank 2
 answered on 31 Jul 2012
1 answer
68 views
I cannot find an old document about RadEditor in Telerik web site.
I want to get a user manual of RadEditor ver. 20101Q.
Where is there the manual?

Best Regards,
Akinori
Rumen
Telerik team
 answered on 31 Jul 2012
1 answer
70 views
Hello friends,

We've got a situation, the client wants us to remove the radTabStrip and wants to have everything in a single page, he can scroll it.
And we've different pages in different tabs.

So I was wondering if we can actually have some other control which can handle this. (can radSplitter hadnle something like this ?) and if so would you please spend a moment to get us started here ?

Thanks.
-Aarsh
Princy
Top achievements
Rank 2
 answered on 31 Jul 2012
2 answers
79 views
Hello,

I am working on a solution using odataservice implementing linq to entity.
there is a table named worksite. It has basic informstion as name, address, etc..

There is a separate table named location. It has four level of hierarchy. e.g onshore/ offshore is the parent. then it had child as area, then region and finally field.

We are saving location Id as foreign key in worksite table. We need to enable filtering on all four fields of location but the only data saved in worksite is location id and from that we can track parent and go to the fourth level.

first  query is : Is there a simple way to filter on Location name for which id is saved. by default  datafield is set to Location Id so filtering is enabled on id which is  number not on name.

second query : How can we implement filtering on other fields i.e. Location.Parent.Name, Location.Parent.Parent.Name, etc... which are not saved anywhere but evaluated at run time from value of location id.

Prachi
Top achievements
Rank 1
 answered on 31 Jul 2012
0 answers
61 views
Hi,

I think there might be some post talking about this, but I just cant find it.
Basically i had follow example from the demo,
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx 
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchyloadmodemixed/defaultcs.aspx 

My intention is to have Master table on the flat form, child on the 1st grid and grand child on the 2nd grid.
My problem now, is that I had followed the way to define the aspx, but I just can't get the grid bind, and I tried used profiler and it did not manage to tell if the sqldatasource is fired to get the data.

<table style="width: 100%;">
                <tr><td style="height:5px;"></td></tr>
                <tr>
                    <td class="formcellproperty"><asp:Label ID="lblLabelType" runat="server" Text="Type"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue">
                        <asp:RadioButton ID="optStockIn" runat="server" TabIndex="1" Text="Stock In" GroupName="StockInOut" Checked="true" />
                        <asp:RadioButton ID="optStockOut" runat="server" TabIndex="2" Text="Stock Out" GroupName="StockInOut" />
                    </td>
                </tr>
                <tr>
                    <td class="formcellproperty"><asp:Label ID="lblLabelTxnNo" runat="server" Text="No"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue">
                        <telerik:RadTextBox ID="txtTxnNo" runat="server" Text="" Enabled="false" TabIndex="3" MaxLength="20" CssClass="formtextbox-short"></telerik:RadTextBox>
                    </td>
                    <td class="formcellproperty"><asp:Label ID="lblLabelTxnDate" runat="server" Text="Date"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue">
                        <telerik:RadDatePicker ID="dtpTxnDate" runat="server" TabIndex="4"></telerik:RadDatePicker>
                        <asp:RequiredFieldValidator ID="rfvDtpTxnDate" runat="server" ErrorMessage="*" ControlToValidate="dtpTxnDate"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="formcellproperty"><asp:Label ID="txtLabelRefNo" runat="server" Text="Ref. No"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue">
                        <telerik:RadTextBox ID="txtRefNo" runat="server" TabIndex="5" MaxLength="20" CssClass="formtextbox-short"></telerik:RadTextBox>
                    </td>
                    <td class="formcellproperty"><asp:Label ID="Label2" runat="server" Text="P.O No"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue">
                        <telerik:RadTextBox ID="txtPONo" runat="server" TabIndex="6" MaxLength="20" CssClass="formtextbox-short"></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="rfvTxtPONo" runat="server" ErrorMessage="*" ControlToValidate="txtPONo"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="formcellproperty"><asp:Label ID="lblLabelVendor" runat="server" Text="Vendor"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue" colspan="3">
                        <telerik:RadComboBox ID="cboVendor" runat="server" TabIndex="7" ></telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="rfvCboVendor" runat="server" ErrorMessage="*" ControlToValidate="cboVendor"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="formcellproperty"><asp:Label ID="lblLabelRemark" runat="server" Text="Remark"></asp:Label></td>
                    <td class="formcolonwidth">:</td>
                    <td class="formcellvalue" colspan="3">
                        <telerik:RadTextBox ID="txtRemark" runat="server" TabIndex="8" MaxLength="300" CssClass="formtextareabox-wide" TextMode="MultiLine"></telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        <asp:HiddenField ID="hidHeaderGuid" runat="server"></asp:HiddenField>
                        <asp:HiddenField ID="hidDetailGuid" runat="server"></asp:HiddenField>
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        <table style="width: 100%;">
                            <tr><td style="height: 5px;"></td></tr>
                            <tr>
                                <td>
                                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50">
                                        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
                                    </telerik:RadAjaxLoadingPanel>
                                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" >
                                        <AjaxSettings>
                                            <telerik:AjaxSetting AjaxControlID="grdDetail">
                                                <UpdatedControls>
                                                    <telerik:AjaxUpdatedControl ControlID="grdDetail" LoadingPanelID="RadAjaxLoadingPanel1" />
                                                    <telerik:AjaxUpdatedControl ControlID="grdSubdetail" />
                                                </UpdatedControls>
                                            </telerik:AjaxSetting>
                                        </AjaxSettings>
                                    </telerik:RadAjaxManager>
                                    <telerik:RadGrid ID="grdDetail" runat="server" ShowStatusBar="true" DataSourceID="dsDetail"
                                        AutoGenerateColumns="False" PageSize="3" AllowSorting="True" AllowMultiRowSelection="False"
                                        AllowPaging="True" GridLines="None" OnItemUpdated="grdDetail_ItemUpdated" OnItemDeleted="grdDetail_ItemDeleted"
                                        OnItemInserted="grdDetail_ItemInserted" OnInsertCommand="grdDetail_InsertCommand" OnItemCreated="grdDetail_ItemCreated">
                                        <PagerStyle Mode="NumericPages"></PagerStyle>
                                        <ClientSettings AllowExpandCollapse="True"></ClientSettings>
                                        <MasterTableView DataKeyNames="stockdtl_guid" DataSourceID="dsDetail" AllowMultiColumnSorting="True" Width="100%" CommandItemDisplay="Top" Name="Detail" EditMode="InPlace">
                                            <DetailTables>
                                                <telerik:GridTableView DataKeyNames="stocksubdtl_guid" DataSourceID="dsSubdetail" Width="100%" runat="server" CommandItemDisplay="Top" Name="Sub Detail">
                                                    <ParentTableRelation>
                                                        <telerik:GridRelationFields DetailKeyField="stockdtl_guid" MasterKeyField="stockdtl_guid" />
                                                    </ParentTableRelation>
                                                    <Columns>
                                                        <telerik:GridBoundColumn SortExpression="stocksubdtl_guid" HeaderText="Subdetail Guid" HeaderButtonType="TextButton"
                                                            DataField="stocksubdtl_guid" UniqueName="stocksubdtl_guid" ReadOnly="true" Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="stocksubdtl_dtl_guid" HeaderText="Subdetail Detail Guid" HeaderButtonType="TextButton"
                                                            DataField="stocksubdtl_dtl_guid" UniqueName="stocksubdtl_dtl_guid" ReadOnly="true" Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="stocksubdtl_serial_num" HeaderText="Serial No" HeaderButtonType="TextButton"
                                                            DataField="stocksubdtl_serial_num" UniqueName="stocksubdtl_serial_num">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="stocksubdtl_part_num" HeaderText="Part No." HeaderButtonType="TextButton"
                                                            DataField="stocksubdtl_part_num" UniqueName="stocksubdtl_part_num">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn SortExpression="stocksubdtl_qty" HeaderText="Quantity" HeaderButtonType="TextButton"
                                                            DataField="stocksubdtl_qty" UniqueName="stocksubdtl_qty">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1">
                                                            <HeaderStyle Width="20px" />
                                                            <ItemStyle CssClass="MyImageButton" />
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn ConfirmText="Are you sure want to deactivate this sub detail?" ButtonType="ImageButton"
                                                            CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1">
                                                            <HeaderStyle Width="20px" />
                                                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                </telerik:GridTableView>
                                            </DetailTables>
                                            <Columns>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_guid" HeaderText="Detail Guid" HeaderButtonType="TextButton"
                                                    DataField="stockdtl_guid" UniqueName="stockdtl_guid" ReadOnly="true" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_hdr_guid" HeaderText="Detail Header Guid" HeaderButtonType="TextButton"
                                                    DataField="stockdtl_hdr_guid" UniqueName="stockdtl_hdr_guid" ReadOnly="true" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_product_guid" HeaderText="Product" HeaderButtonType="TextButton"
                                                    DataField="stockdtl_product_guid" UniqueName="stockdtl_product_guid">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_batch_no" HeaderText="Batch No"
                                                    HeaderButtonType="TextButton" DataField="stockdtl_batch_no" UniqueName="stockdtl_batch_no">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_qty" HeaderText="Quantity" HeaderButtonType="TextButton"
                                                    DataField="stockdtl_qty" UniqueName="stockdtl_qty">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn SortExpression="stockdtl_cost" HeaderText="Cost" HeaderButtonType="TextButton"
                                                    DataField="stockdtl_cost" UniqueName="stockdtl_cost">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
                                                    <HeaderStyle Width="20px" />
                                                    <ItemStyle CssClass="MyImageButton" />
                                                </telerik:GridEditCommandColumn>
                                                <telerik:GridButtonColumn ConfirmText="Are you sure want to deactivate this detail?" ButtonType="ImageButton"
                                                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">
                                                    <HeaderStyle Width="20px" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                                </telerik:GridButtonColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>
                                    <asp:SqlDataSource ID="dsDetail" runat="server" SelectCommand="exec usp_Master_SelectStockDetail @stockdtl_guid, @stockdtl_hdr_guid" SelectCommandType="StoredProcedure" >
                                        <SelectParameters>
                                            <asp:Parameter Name="stockdtl_guid" Type="String" />
                                            <asp:ControlParameter ControlID="hidHeaderGuid" PropertyName="Value" Type="String" Name="stockdtl_hdr_guid" DefaultValue="" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                    <asp:SqlDataSource ID="dsSubdetail" runat="server" SelectCommand="exec usp_Master_SelectStockSubDetail @stocksubdtl_guid, @stocksubdtl_dtl_guid"  SelectCommandType="StoredProcedure">
                                        <SelectParameters>
                                            <asp:Parameter Name="stocksubdtl_guid" Type="String" />
                                            <asp:ControlParameter ControlID="hidDetailGuid" PropertyName="Value" Type="String" Name="stocksubdtl_dtl_guid" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
Kien
Top achievements
Rank 1
 asked on 31 Jul 2012
2 answers
145 views
Hi I have a scheduler thaat utilises a appointment template.  I need the appointment to display a graphic if the appointment has not yet been completed. 

This is worked out with my SQL datasource and a field is returned called "IsNotComplete", this feild is a boolean which obviously returns true/false. 

I then have set the scheduler to utilise this field in the CustomAttributeNames section.
I then coded the following inside the scheduler

 <AppointmentTemplate > 
                          
  <TABLE cellSpacing=0 cellPadding=0 width="100%">  
  <TBODY><TR><TD><%# Eval("Subject") %></TD>  
  <TD vAlign=top>  
<asp:Image id="AppointmentNotComplete" runat="server" ImageUrl="~/Images/warning_icon.gif" ToolTip="Incomplete"   
Visible='<%# Eval("IsNotComplete") %>' 
 ImageAlign="Top"></asp:Image> 
</TD></TR></TBODY></TABLE>  
                       
                                      
                                      
</AppointmentTemplate>   
When I open the page in my browser(IE7) I get the following message "Specified Cast Is Invalid". I then adjusted my code to display the content of the eval statement like so:
                        <AppointmentTemplate > 
                          
  <TABLE cellSpacing=0 cellPadding=0 width="100%">  
  <TBODY><TR><TD><%# Eval("IsNotComplete") %> 
  </br> 
  <%# Eval("Subject") %></TD>  
  <TD vAlign=top>  
<asp:Image id="AppointmentNotComplete" runat="server" ImageUrl="~/Images/warning_icon.gif" ToolTip="Incomplete"   
Visible='true' 
 ImageAlign="Top"></asp:Image> 
</TD></TR></TBODY></TABLE>  
                       
                                      
                                      
</AppointmentTemplate> 
The page is then viewable and the value on the apointments clearly shows either "True" or "False".
I then reverted to the first code snippet (top) and added visible='<%# (bool)Eval("IsNotComplete") %>' just incase there was some kind of casting problem but it still errored with "Specified Cast Invalid"

My question is why does the true/false value cause a cast issue?  Is there any where of fixing it?


Steven
Top achievements
Rank 1
 answered on 30 Jul 2012
4 answers
96 views
I have a RadGrid on my page and I'd like to be able to click a GridButtonColumn and have it populate the row from the grid into the Advanced Form (which I've customized greatly).  I've figured out how to get the items out of the grid (below), however I don't know how to populate and show the form.

How would I do this? 

protected void grdOpenOrders_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "schedule")
            {
                GridDataItem item = (GridDataItem)e.Item;               
                //item["material"].Text
                //item["subpool"].Text
                //item["quantity"].Text
                //item["unit"].Text
                //item["shipdate"].Text
                //item["orderDate"].Text               
            }
        }
Steven
Top achievements
Rank 1
 answered on 30 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?