Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
132 views
Hi,
in RadGrid I'm using Popup Edit Form. When I inserted/updated a record this popup is closing. How to avoid this behavior and close the popup only if user clicks close button on the popup?
Pavlina
Telerik team
 answered on 14 Jan 2010
2 answers
253 views

Hi
I'm trying to change the caption/text on a GridButtonColumn, by code.
What i want is that the text on the PushButton is dependent on the value of a field.
The result is that I don’t see the push button, but only a text.
Can anybody tell me what I do wrong?

Thanks
Erik


aspx
<telerik:GridButtonColumn ButtonType="PushButton" text="Create" 
         UniqueName="versionFunction" HeaderText="Function"
    <HeaderStyle Width="100px"></HeaderStyle> 
</telerik:GridButtonColumn> 

C#
 protected void Grid_Versioner_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem dataItem = (GridDataItem)e.Item; 
            switch (dataItem["Status"].Text) 
            { 
                case "Created"
                    dataItem["versionFunction"].Text = "Execute"
                    break
                case "Executing"
                    dataItem["versionFunction"].Text = "Executeing"
                    break
            } 
        } 
    } 

Erik Hansen
Top achievements
Rank 1
 answered on 14 Jan 2010
8 answers
305 views
I want to put a hyperlink column in my grid but the gridhyperlinkcolumn is not editable.

I want it to be a hyperlinkcolumn in view mode and be editable in edit/insert mode.

Can I make it editable without using a Template column?
Denise Duggan
Top achievements
Rank 1
 answered on 14 Jan 2010
2 answers
116 views
Greets folks,
I want to set the end date to the start date when the start date chages.
I've followed instructions i found on the site to use this code
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
            <script type="text/javascript">  
                function changeEndDate(sender, e) {  
                    //if start date changes change end date to be greater than start  
                    var endDatePicker = $find("<%= EndDate.ClientID %>");  
                    if ( sender.get_selectedDate() > endDatePicker.get_selectedDate()) {  
                        endDatePicker.set_selectedDate(sender.get_selectedDate());  
                    }  
                }  
            </script>  
        </telerik:RadScriptBlock> 

I'm doing something a little different with regards to showing and hiding controls on the advanced form.

When the form first loads, I am only showing the start date and time.
The user has the ability to specify an end date time but they are not required to.

If the form loads with just the start visible and end hidden, the end date is not getting updated on start date change when the end date control is hidden and it continues to not get updated on start date change even when i use the UI to show the end date. 
When debugging I see that the control is accessible but the date values are not correct.

If I successfully save an appointment with a valid start and end date and I go to edit that appointment, my advanced form pops up with both the start and end visible. At this point that changeEndDate function works as expected even when the end date control is hidden using the UI (if a user decides they no longer need an end date they can hide the end date controls).

So the changeEndDate function works when the end date control is visible and hidden ( as I would expect) except for when the form loads with the end date controls hidden (which I don't expect).
The same code is being used to hide the end date controls using a check box similar to how the all day check box hides the time controls.

any tips? this is probably a general html/javascript issue rather than a telerik specific one.

regards
towpse
Top achievements
Rank 2
 answered on 14 Jan 2010
5 answers
598 views

Hi, I placed a combobox as below , with auto complete feature and load on demand.

<

 

telerik:RadComboBox ID="radCboCity" runat="server" Width="175px" Height="150px" AllowCustomText=true EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnItemsRequested="radCboCity_ItemsRequested"></telerik:RadComboBox>

I redirect to this form with querystring parameters which should populate the criteria on this form. I am setting the combobox value from server side something like : radCboCity.value= sCity;

well, I have some clientside validations and ajax postbacks on load of this form and the combo value returns 'undefined'. I am accessing the combo value from an external javascript file using the standard document object : document.getElementById("radCboCity").value

If I repost this form it returns a valid value.

Why is this behaviour? Am I missing mosthing?

thanks

 

Kalyani Mantripragada
Top achievements
Rank 1
 answered on 14 Jan 2010
1 answer
140 views
Hi Telerik,
I have problem with export to excel: my Location should be in the 3rd position show as last column in the report. Here is the code

<telerik:RadGrid ID="grdWarranty" runat="server" AllowPaging="True" AllowSorting="True" 
    AutoGenerateColumns="False" GridLines="None" Skin="Default" Width="700px" PageSize="7" 
    OnNeedDataSource="grdWarranty_NeedDataSource" OnItemCommand="grdWarranty_ItemCommand" 
    OnItemCreated="grdWarranty_ItemCreated" ShowStatusBar="true"
    <MasterTableView Width="100%" UseAllDataFields="True" TableLayout="Fixed" DataKeyNames="CompanyID,LocationID,ObjectType,ObjectID"
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px" /> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px" /> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Name" DataField="ObjectName" SortExpression="ObjectName"
                <ItemTemplate> 
                    <asp:LinkButton ID="LinkButtonOpen" runat="server" CausesValidation="False" CommandName='<%# DataBinder.Eval(Container, "DataItem.ObjectType") %>' 
                        CommandArgument='<%# DataBinder.Eval(Container, "DataItem.ObjectID") %>' Text='<%# DataBinder.Eval(Container, "DataItem.ObjectName") %>' /> 
                    <asp:Label runat="server" ID="lblName" Visible="false" Text='<%# DataBinder.Eval(Container, "DataItem.ObjectName") %>'></asp:Label> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn HeaderText="Type" DataField="ObjectType"
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn HeaderText="Location" DataField="LocationName" SortExpression="LocationName"
                <ItemTemplate> 
                    <%# LocationDisp(DataBinder.Eval(Container, "DataItem.LocationName").ToString()) %> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Expires" DataField="ExpirationDateFormatted" SortExpression="ExpirationDate"
                <ItemTemplate> 
                    <%# DateString.GetDateValue(DataBinder.Eval(Container, "DataItem.ExpirationDate").ToString()).ToString("M/d/yyyy").Replace("1/1/1900", "") %> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="# Days" DataField="ExpirationDays" SortExpression="ExpirationDate"
                <ItemTemplate> 
                    <%# GetExpiration(DataBinder.Eval(Container, "DataItem.ExpirationDate").ToString()) %> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
    <PagerStyle AlwaysVisible="true" Mode="NumericPages" /> 
    <ClientSettings EnableAlternatingItems="true" EnableRowHoverStyle="true"
        <Scrolling AllowScroll="true" ScrollHeight="185px" UseStaticHeaders="true" /> 
    </ClientSettings> 
</telerik:RadGrid> 
What am i missing?
Thank you


Daniel
Telerik team
 answered on 14 Jan 2010
7 answers
373 views
Respected Sir,

   I have a doubt in setting the Radgrid Alternateitemstyle property.i had written the code like this in common skin of the radgrid.But it doesnt shows the effects and the selected row is highlighted by the blue .
the code is like this:
 
<telerik:RadGrid EnableEmbeddedSkins=false AlternatingItemStyle-BackColor="#f6f6f6"
    runat="server" Skin="Web20">

   <ClientSettings  EnableRowHoverStyle="True" >
    <Selecting AllowRowSelect="True" />
    <ClientEvents OnRowSelecting="RowSelecting" />
   </ClientSettings>
  <ItemStyle  BorderStyle="Solid" BorderWidth="10px" BorderColor="#00000"   HorizontalAlign="Left"/>
    <AlternatingItemStyle BorderStyle="Solid"  BorderColor="#080808 "  BorderWidth="1px"  HorizontalAlign="Left"  />
</telerik:RadGrid>
Please give me a  solution to fix this problem
                                                                                                                                           Thank you
                                                                                                                                               JINI A B
Dimo
Telerik team
 answered on 14 Jan 2010
3 answers
91 views
Dear,

Version Q2 2009 released 08/26/2009
Visual Studio 2008 (VB.NET)
OS Win7

Reference of your Example " Grid / Tooltipified RadGrid "

Note, that when the page index is changed, or a sorting has been done, the RadToolTipManager's TargetControls collection is cleared because the records on the new grid's page have the same ClientIDs as the old ones.

i did exactly as you mention in the example. but i am doing little bit change. in "UpdateToolTip" routine. i my case the behavior is little bit change. on Page 2 its showing the Page 1 tool tip. and On Page 3 its Showing Page 2 tool tip. when we comeback on previous page 2 its showing Page3 tooltip.  :(

please if you can figureout this problem.

 

 

Private Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)

 

 

 

 

Dim ctrl As Control = Page.LoadControl("usercontrols/_attractions.ascx")

 panel.ContentTemplateContainer.Controls.Add(ctrl)

 

Dim TempHotel As DataTable = ViewState("AttractionDetails")

  

 

Dim i As Integer

 

 

 

 

 

 

Dim TempTable As New DataTable

 

 

Dim DC As DataColumn

 

DC =

 

New DataColumn

 

DC.ColumnName =

"HotelCode"

 

 

 

 

DC.DataType = System.Type.GetType("System.String")

 

 

 

TempTable.Columns.Add(DC)

DC =

New DataColumn

 

 

 

DC.ColumnName =

"AttrName"

 

 

 

 

 

 

DC.DataType = System.Type.GetType(

"System.String")

 

 

 

TempTable.Columns.Add(DC)

DC =

New DataColumn

 

 

 

DC.ColumnName =

"Distance"

 

 

 

 

 

 

 

DC.DataType = System.Type.GetType(

"System.String")

 

 

 

TempTable.Columns.Add(DC)

 

 

 

Dim FindDR() As DataRow = TempHotel.Select("HotelCode='" & elementID & "'")

 

For i = 0 To FindDR.Length - 1

 

 

 

 

 

Dim DR As DataRow

 

DR = TempTable.NewRow

DR(0) = FindDR(i).Item(0)

DR(1) = FindDR(i).Item(1)

DR(2) = FindDR(i).Item(2)

TempTable.Rows.Add(DR)

 

 

Next

 

 

 

 

 Application(

"TempData") = TempTable

End Sub

becuase my all data is coming from XML Source just for display. i am not fatching this data from the database.

One more thing i want to share not realated with this problem. i need to create a XMLNode like <c:condition> is it posible?

Regards

 

 

 

 

 

 

 

Tsvetoslav
Telerik team
 answered on 14 Jan 2010
1 answer
188 views
Hello,

We have a grid with several tabs in the edit form and each tab in turn contains other grids. Each grid in the tabs contain custom edit forms. Some of the textboxes in these forms are mandatory. Furthermore, some of the mandatory textboxes are numeric which should have values bigger than 0.

We would like to group the textboxes in the edit forms by their IDs and validate the required ones (both numeric and plain textboxes) and numeric ones seperately. Is such a scenario supported by RadInputManager ?

Thanks,
Oner
Tsvetoslav
Telerik team
 answered on 14 Jan 2010
2 answers
151 views
When a RadWindow is minimised and/or restored in Firefox, the content of the RadWindow is fully re-loaded. This means that, when an aspx page is being used as the content URL, all parameters that the user has entered into fields on the web-form in the RadWindow are discarded.

In IE browsers, the content page is not re-loaded and, therefore, the user can minimise and restore the RadWindow without losing any data.

Is there any workaround/fix for this problem?
Andy
Top achievements
Rank 1
 answered on 14 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?