Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
118 views
Hello !
I'm a beginner with Telerik and ASP.NET.
I would like to do something I know it is possible but I can't understand how it works.

I work with VB.NET. I have a page with code behind.
In my page, the first time it is displayed, I want to show only
 - a telerik:RadTextBox
 - and an asp:ImageButton

What I would like to do is :
When the user write some text in the radtextbox then click on the ImageButton, I want to execute in the code behind of my page, some

code with an sql query and then, if with the sql query I find in my databases the value the user has written in the radtextbox, I

would like to show a panel (just change its property VISIBLE=FALSE to TRUE) and then to fill a telerik:RadComboBox that is situated

inside the panel that is now visible.
If the sql query can't find the value, I do not show the panel and I just show an error message on the page (with a label).


I have tried so many things but I can't understand how to do this.
Thank you for your help.

This is my code in the page with the controls :
(the panel i want to change the property VISIBLE is the one with the ID="PanelMineListe" - the textbox the user uses to write the

first value is the one with the ID="RadTextBoxMine" the he clicks on the imagebutton with te id="BtImgMineValider")


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ajax-essais.aspx.vb" Inherits="ajax_essais" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Essais</title>
</head>
<body>
 <form id="form1" runat="server">
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
  <asp:Panel ID="PanelRechMINE" runat="server" DefaultButton="BtImgMineValider"
           style="width:440px; padding-left:81px; height:100px; padding-top:20px; float:left;">


    <div style="float:left; position:relative; width:420px;">
      <div style="float:left; position:relative; padding-right:6px; height:28px;">
        <telerik:RadTextBox ID="RadTextBoxMine" runat="server" CssClass="BoxesOmbrees"
        EmptyMessage="Votre type Mine ici.." ValidationGroup="RechMine"
        Skin="Windows7" Width="190px"></telerik:RadTextBox>
       </div>
       <div style="float:left; position:relative; padding-right:6px;  height:28px;">
        <asp:ImageButton ID="BtImgMineValider" runat="server" Visible="true"
          ImageUrl="~/photos-francepiecesauto/commun/BtTrouver_r1_c1.png" ValidationGroup="RechMine"
                     title="Lancer une recherche.." />
       </div>
       <div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000; padding-top:6px;">
          <asp:RequiredFieldValidator ID="RequiredFieldValidatorMine1" runat="server" ControlToValidate="RadTextBoxMine"

ErrorMessage="* Type Mine requis." Display="Dynamic" ValidationGroup="RechMine" />
       </div>
    </div>



    <asp:Panel ID="PanelMineErrors1" runat="server" Visible="false" style="float:left; position:relative; width:420px; font-size:10px;

color:#ff0000;">
    <asp:Label ID="LabelMineErrors1" runat="server" />
    </asp:Panel>
    


    <asp:Panel ID="PanelMineListe" runat="server" DefaultButton="ImageButtonMineValid2" Visible="false" style="float:left;

position:relative; width:420px;">
       <div style="float:left; position:relative; padding-right:6px; width:300px; height:28px;">
             <telerik:RadComboBox ID="RadComboBoxMineListe" runat="server" MaxHeight="200px" Width="296px"
                  ValidationGroup="RechMine2" EmptyMessage="Choisissez un vĂ©hicule..." />
       </div>
       <div style="float:left; position:relative; height:28px; font-size:10px; color:#ff0000;">
          <asp:ImageButton ID="ImageButtonMineValid2" runat="server" Visible="true"
          ImageUrl="~/photos-francepiecesauto/commun/BtTrouver2_r1_c1.png" ValidationGroup="RechMine2"
                     title="Afficher le catalogue.." ToolTip="Afficher le catalogue.." />
          <asp:RequiredFieldValidator ID="RequiredFieldValidatorMine2" runat="server" style="color:#ff0000;"
                  ControlToValidate="RadComboBoxMineListe" ErrorMessage=" *" Display="Dynamic" ValidationGroup="RechMine2" />
       </div>
     </asp:Panel>




  </asp:Panel>
 </form>
</body>
</html>
Maria Ilieva
Telerik team
 answered on 27 Oct 2010
1 answer
177 views

When I try to retrive a cell value, its returning '&nbsp;' if the value is null. Is something wrong in the code?
why doesn't it just return empty string('') instead of '&nbsp;'?

Thank you
Neelima

Private Sub RadgridDestination_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadgridDestination.SelectedIndexChanged   
        
Dim row As GridDataItem = RadgridDestination.Items(RadgridDestination.SelectedIndexes(0))   
        
btnUpdate.Visible = True 
        
uc_Addr.Visible = True 
        
btnAdd.Visible = False 
        
With uc_Addr  ' uc_Addr is an User Control  
        
.Desc = row("Description").Text   
        
.Addr1 = row("Address1").Text   
        
.Addr2 = row("Address2").Text  'retuns '&nbsp;' if the cell value is null. 
        
.State.SelectedValue = row("StateID").Text   
        
.City.SelectedValue = row("CityID").Text   
        
.Zip.SelectedValue = row("ZipID").Text 
        
.Phone = row("Phone").Text  'retuns '&nbsp;' if the cell value is null.  
        
End With 
End Sub

<telerik:RadGrid ID="RadgridDestination" runat="server" 
     AllowSorting="True"  ShowGroupPanel="True" 
     AutoGenerateColumns="False"
          Skin="Sunset" AllowPaging="True" GridLines="None">
  
        <GroupingSettings ShowUnGroupButton="True"  />
        <ClientSettings AllowDragToGroup="True" allowcolumnsreorder="True" 
            columnsreordermethod="Reorder" reordercolumnsonclient="True" >
        </ClientSettings>
          
  
<MasterTableView EditMode="InPlace" DataKeyNames="Destination_ID" GroupLoadMode="Client" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
    <Columns>
          
         <telerik:GridButtonColumn CommandName="Select" Text="Edit"  ButtonType="ImageButton"
            UniqueName="column1" 
            ImageUrl="Images/Edit.gif">
        </telerik:GridButtonColumn
      <telerik:GridBoundColumn DataField="Destination_ID" HeaderText="Destination_ID" visible="False" UniqueName="Destination_ID" ReadOnly="true"/>
                         <telerik:GridBoundColumn DataField="Addr_Desc" HeaderText="Description"  UniqueName="Description" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Addr1" HeaderText="Address1" UniqueName="Address1" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Addr2" HeaderText="Address2" UniqueName="Address2" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="State" HeaderText="State" UniqueName="State" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" UniqueName="Zip" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Phone" HeaderText="phone" UniqueName="Phone" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Start_Latitude" HeaderText="Lat" UniqueName="Lattitude" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Start_Longitude" HeaderText="Longt" UniqueName="Longitude" ReadOnly="true"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="State_ID" UniqueName="StateID" Visible="false"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="City_ID" UniqueName="CityID" Visible="false"></telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Zip_ID" UniqueName="ZipID" Visible="false"></telerik:GridBoundColumn>
                      
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
            Text="Delete" UniqueName="Delete">
        </telerik:GridButtonColumn>
                      
            </Columns>
           <EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
  
  
    </telerik:RadGrid>

Daniel
Telerik team
 answered on 27 Oct 2010
1 answer
67 views
Hi,

I would like to change the horizontal selected region image of a slider control on the clientside. I have set to false the EnableEmbeddedSkins property and included a css skin file for the slider control. I see the following class in the css file

.rslHorizontal .rslSelectedregion
{
    background:url(../images/Slider/SelectedRegionHorizontalBgr.gif) right top no-repeat;
}
 But I want to change the image path on a button click.

Any help is appreciated.
Tsvetie
Telerik team
 answered on 27 Oct 2010
1 answer
154 views
Hi,

I was wondering how I could use the RadWindow in combination with the ASP.NET LoginControl?
I'd like to popup a RadWindow when a user enters the wrong login information, or when an error occurs.

Maybe someone already did this? I'm having trouble to get this working.

Thanks,
Daniel
Shinu
Top achievements
Rank 2
 answered on 27 Oct 2010
5 answers
273 views
I have a page that contains the RadScheduler component.  The appointments (subject) display fine in DayView and MonthView modes.  However, in Weekview mode the only appointments that appear to display correctly are ones where there is only one appointment for the timeslot.  If there are more than one, they use a fraction of the space in the current cell.

For example:

  • If I have one appointment for 9:00am, it displays fine
  • If I have two appointments for 9:00am, the first appointment uses only half the width of the cell (instead of the full width), and the second appointment displays the same way directly underneath the first
  • If I have three appointments for 9:00am, the first appointment uses only one third of the width of the cell (instead of the full width), and the second and third appointments display the same way directly underneath the first.

My goal is for each appointment subject to use the entire width of a cell.  If there is more than one appointment for a specific timeslot, they should display vertically in the cell -- not horizontally.

I sample screen shot of the problem is attached.  How do I obtain this result? 

Regards,
Dan M
Veronica
Telerik team
 answered on 27 Oct 2010
2 answers
138 views
I see in telerik site that Header and footer templates are present in RadListBox. But I am not able to see them when I Drag and drop a RadListBox on to .aspx page.

Please find the screen shot attached for details.

Is there any update in version of telerik for that?

Regards,
Sweety.
preethi
Top achievements
Rank 1
 answered on 27 Oct 2010
1 answer
194 views
I use load on demand to load items into the combo box, however, the user can select one of those items OR enter custom text.   See the attached screen shot.   When I tab off the control, it auto selects the first matching value, even with MarkFirstMatch = false.

So if I have "ABCD" as an item in the drop down, I can add "ABB" or anything that differs, but I can not add "ABC" for example because it will just fill in the text.   It actually has "" has it's selected value when this happens, but the text is changed.   The change happens client side before reaching any code in the code behind.

OnClientItemsRequesting
simply cancels the request if less than 3 chars are typed, example from the knowledge base.

<telerik:RadComboBox ID="rcbOrganizationName" Runat="server"                   
           OnSelectedIndexChanged="RcbOrganizationNameSelectedIndexChanged"
    OnItemsRequested="RcbOrganizationNameItemsRequested"
    OnClientItemsRequesting="OnClientItemsRequesting"
    EnableLoadOnDemand="true"
    AllowCustomText="True"
    AutoPostBack="True"
    EmptyMessage="Choose"
    MarkFirstMatch="false"
    EnableItemCaching="true"
    CausesValidation="false"
    TabIndex="2"                     
    ShowMoreResultsBox="false" 
    MaxLength="50"
    MaxHeight="300px"
    Width="250px">
</telerik:RadComboBox >
Peter
Telerik team
 answered on 27 Oct 2010
3 answers
176 views
Hello Telerik,

I have created a a bar chart having 2 Y axis
I need to assign a different toolTip to each series

when using :

e.SeriesItem.ActiveRegion.Tooltip = toolTip.ToString();

it assign the toolTip to the two series

I found solution to assign tooltip to the first series

chart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();


but when using the same for the second series as follow:

chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip =

"Hi Series 2";

 

 

 

I get exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Source Error:

Line 459: RadChart chart = (RadChart) sender;
Line 460: chart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();
Line 461: chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip = "Hi Series 2";

The following is the complete code:

void 

 

ChartFinancialImpact_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)

 

 

{

 

DataRowView physicianDeviation = (DataRowView)e.DataItem;

 

 

 

StringBuilder toolTip = new StringBuilder();

 

 

 

toolTip.Append("Load:" + physicianDeviation["PhysicianLoad"].ToString() );

 

 

 

//e.SeriesItem.ActiveRegion.Tooltip = toolTip.ToString();

 

 

 

RadChart chart = (RadChart) sender;

 

 

  chart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();

 

  //chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip = "Hi Series 1";  ==> ERROR

 

 

}

 

 


Evgenia
Telerik team
 answered on 27 Oct 2010
1 answer
84 views
Hi,

please find the below attachment , suggest me(multiple browser support is required in this scenario). 
Pavlina
Telerik team
 answered on 27 Oct 2010
1 answer
399 views

How can i bind GridDropDownColumn with dataset from behind code


telerik:RadGrid ID="radgdBOQ" runat="server" AutoGenerateColumns="False" GridLines="None"
        OnNeedDataSource="radgdBOQ_NeedDataSource" OnInsertCommand="radgdBOQ_InsertCommand"
        ShowStatusBar="True" OnDeleteCommand="radgdBOQ_DeleteCommand" OnUpdateCommand="radgdBOQ_UpdateCommand"
        Skin="WebBlue">
        <MasterTableView DataKeyNames="bqmiBoqID" CommandItemDisplay="TopAndBottom">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderButtonType="None" HeaderText="Edit">
                    <HeaderStyle HorizontalAlign="Center" Width="35px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow"
                    ConfirmText="Are You Sure To Delete ?" ConfirmTitle="Delete" HeaderButtonType="None"
                    HeaderText="Delete" Text="Delete" UniqueName="DeleteCommandColumn">
                    <HeaderStyle HorizontalAlign="Center" Width="50px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridButtonColumn>
                <telerik:GridNumericColumn DataField="bqmiItemCode" DataType="System.Int32" HeaderText="Item Code"
                    UniqueName="bqmiItemCode">
                    <HeaderStyle HorizontalAlign="Center" Width="75px" />
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn DataField="bqmiItemDescription" HeaderText="Description"
                    UniqueName="bqmiItemDescription">
                    <HeaderStyle HorizontalAlign="Center" Width="150px" />
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="bqmiUnit" HeaderText="Unit" UniqueName="bqmiUnit">
                    <HeaderStyle HorizontalAlign="Center" Width="50px" />
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridNumericColumn DataField="bqmiPrice" DataType="System.Decimal" HeaderText="Price"
                    NumericType="Currency" UniqueName="bqmiPrice" DefaultInsertValue="0">
                    <HeaderStyle HorizontalAlign="Center" Width="100px" />
                    <ItemStyle HorizontalAlign="Right" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="bqmiQty" DataType="System.Decimal" HeaderText="Quantity"
                    UniqueName="bqmiQty" DefaultInsertValue="0">
                    <HeaderStyle HorizontalAlign="Center" Width="100px" />
                    <ItemStyle HorizontalAlign="Right" />
                </telerik:GridNumericColumn>
                <telerik:GridCalculatedColumn DataFields="bqmiPrice,bqmiQty" DataType="System.Decimal"
                    Expression="{0}*{1}" HeaderText="Amount" UniqueName="bqmiAmount">
                </telerik:GridCalculatedColumn>
                <telerik:GridDropDownColumn HeaderText="Drop" UniqueName="drop" DataField="drop"
                    DefaultInsertValue="0">
                </telerik:GridDropDownColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
    </telerik:RadGrid>


 

Princy
Top achievements
Rank 2
 answered on 27 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?