Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
124 views
2010.2.722.35   Skin="Office2007"

I have a column that is GridTemplateColumn and its headertext font is smaller than the rest of GridBoundColumn.
I do not explicitly set font other than the grid Skin to Office2007.

                <telerik:GridTemplateColumn HeaderText="Online" UniqueName="Online">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkOnline" runat="server" Checked='<%# Eval("Online") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>  

Update -- Strange, I removed skin, then reapplied skin, and now it's fine.   All are displaying the smaller size.
Veli
Telerik team
 answered on 04 Aug 2010
1 answer
110 views

Hi

We have a grid that, in edit mode, the user has the options to 'Save this record' or 'Save this record and add another'.  When clicking the 2nd option, the current record should be persisted to the database and a new blank form should be presented to allow the user to enter more data.  Very often we want to prepopulate the form based on the previous entry.  I have the following code to do this:

 

 

 

 

protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandSource is LinkButton)
    {
        LinkButton sourceLinkButton = (LinkButton)e.CommandSource;
        if (sourceLinkButton.ID == "SaveThisRecordAndAddAnotherLinkButton")
        {
            e.Item.OwnerTableView.PerformInsert();
            RadGrid1.MasterTableView.IsItemInserted = true;

            
//Prepare an IDictionary with the predefined values
            System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
            newValues["Remarks"] = "Test remarks";

            
//Insert the item and rebind
            e.Item.OwnerTableView.InsertItem(newValues);
            RadGrid1.Rebind();
            Utils.Log("IsItemInserted:" + RadGrid1.MasterTableView.IsItemInserted);
        }
        else
        {
            RadGrid1.MasterTableView.IsItemInserted = false;
        }
    }
}


What I'm getting is:
  • the current record is persisted correctly to the database
  • NO new insert form is presented to the user
  • a 2nd record with the prepopulated value "Test remarks" is added to the database
  • the Utils.Log debug statement shows in the log that 'IsItemInserted' is set to true

As a test, I placed the statement 'RadGrid1.MasterTableView.IsItemInserted = true;' in the Page_Load event and the grid loaded with the insert form open as expected.
In contrast, if I place the same in the RadGrid1_PreRender event, no insert form appears.

I'm using RadControls_for_ASP.NET_AJAX_2010_1_415_dev_hotfix.zip.

Is the InsertCommand event too late in the page life cycle for 'IsItemInserted = true;' to show the insert form?

What's strange is that we have another web app (implemented in VB) on an earlier version of the Telerik controls and this method works fine!

Please help.

Veli
Telerik team
 answered on 04 Aug 2010
1 answer
91 views
Hello,

I would like to ask if it is possible to sort or arrange my RadPanelItems by dragging the panel items.

Thank you.

Yana
Telerik team
 answered on 04 Aug 2010
1 answer
226 views
Hai,

I have a tabstrip with 7 tabs and 7 pageviews in one multipage. Each of these tabs contains one grid, which binds with data on clicking the corresponding tab. But I want one tab to be selected on page load. I got it as selected by using the following code, but the corresponding grid inside the pageview is not showing.

RadTabStrip3.Tabs[0].Selected =

true; //first tab in the tabs collection
LoadPlanMenuMon.Visible =
true; //corresponding pageview
RadGrid1.Visible =
true; //corresponding radgrid inside pageview


Plz help.

Shinu
Top achievements
Rank 2
 answered on 04 Aug 2010
2 answers
219 views
Hi all,

I have radgrid, on every row selection, we are showing detail view for that particular row.
In that i am showing some field data i.e COMPANY, STATUS, ADDRESS and ACTION REQUIRED
and now i wanted to show YES or NO type of small icons as per some condition for a ACTION REQUIRED field.

How can i show icons for this scenario.
need sample code for this.
arun
Top achievements
Rank 1
 answered on 04 Aug 2010
4 answers
336 views
Hello Sir/Madam

I have radalert in my code, and by default "OK" button display at Left side of radalert window.
as i want to display button at right side.
and while doing that my window size should be not change.
can you suggest me about this.

Thanks
Pritesh
Pritesh
Top achievements
Rank 1
 answered on 04 Aug 2010
2 answers
231 views

Hi,

I am using radgrid with Inplace EditMode and its working fine when there is data available in grid.

 
But when there is no any data in grid, and then on clicking on “Add Row” the grid is getting blank without any new row for inserting data

 

Please get the details decription in attached file.


Thanks
Mukesh


Mukesh
Top achievements
Rank 1
 answered on 04 Aug 2010
2 answers
177 views
Is there an easy way to minimize column width?  For example for Edit and Delete columns the minimum column width would always be the same based on the style characteristics and the text for the two columns.  For those familiar with Android development I'm looking for something similar to android:width="wrap_content" for a View.  I don't want to specify an exact width like 50px I want to set it to "minimum" or something.
Jeremy
Top achievements
Rank 1
 answered on 04 Aug 2010
5 answers
541 views

Hi

I am using this code to display a RAD Date Picker (I am using Rad Ajax Control for ASP .Net Version Q3 2008) . My requirement is on Tab off(lost focus) calendar popup should be hide. This is working while I added “OnBlur” event on “DateInput” control. But now it is creating a new problem. It is not showing new selected date in DatePicker control. For example if DatePicker already have “09/09/2008” as date value and now I have selected “09/08/2008” as new date, This new selected date is not coming in DatePicker control (If I commented ctl.hidePopup() statement from _txtClaimantDOI_OnBlur()   Then I am able to see new selected date in date picker control).

<telerik:RadDatePicker ID="txtClaimantDOI"  runat="server" Skin="Office2007" EnableEmbeddedSkins="false" Width="70px">

<DateInput onfocus="_txtClaimantDOI_OnFocus()"  OnBlur="_txtClaimantDOI_OnBlur()"  >

</DateInput>

<Calendar DayNameFormat="FirstLetter" FirstDayOfWeek="Default" EnableMultiSelect="false"

    UseColumnHeadersAsSelectors="False" 

    UseRowHeadersAsSelectors="False" TabIndex="0">

</Calendar>

<ClientEvents OnDateSelected="DateSelected" />

<DatePopupButton Visible="true" Style="display: none;" TabIndex="0" />

</telerik:RadDatePicker>

<telerik:RadScriptBlock ID="txtClaimantDOIScriptBlock" runat="server">

<script language="javascript" type="text/javascript">

//<![CDATA[

function _txtClaimantDOI_OnFocus() {

    var ctl = $find("<%= txtClaimantDOI.ClientID %>");

    ctl.showPopup();

}

function _txtClaimantDOI_OnBlur() {

    var ctl = $find("<%= txtClaimantDOI.ClientID %>");

    ctl.hidePopup();   

}

//]]>

</script>

</telerik:RadScriptBlock>

 

Please help me in this.

Regards
Atul Kumar Srivastav

Tom Robertson
Top achievements
Rank 1
 answered on 03 Aug 2010
2 answers
435 views
Hello,

I have a RadGrid with three groups.  I would like to always have one and only one group expanded at a time.  I have successfully configured the grid to have the first group by doing this in the ItemDataBound event:
If TypeOf e.Item Is GridGroupHeaderItem Then
    Dim item As GridGroupHeaderItem = e.Item
    If item.GroupIndex = "0" Then
    item.Expanded = True
    End If
End If

I tried this code to handle expanding only the "clicked on" header item, but it does not work:

Private Sub rgvReportGrid_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgvReportGrid.ItemCommand
    If e.CommandName = RadGrid.ExpandCollapseCommandName Then
        Dim item As GridGroupHeaderItem = e.Item
        Dim groupIndex As String = item.GroupIndex.ToString
        Dim grid As RadGrid = source
        For Each gridItem As GridItem In grid.MasterTableView.Controls(0).Controls
            If TypeOf (gridItem) Is GridGroupHeaderItem Then
                Dim groupHeaderItem As GridGroupHeaderItem = gridItem
                If groupHeaderItem.GroupIndex.ToString = groupIndex Then
                    groupHeaderItem.Expanded = True
                Else
                    groupHeaderItem.Expanded = False
                End If
            End If
        Next
    End If
End Sub

Even though I'm setting the .Expanded attribute to True (I observe that one item gets hit during debugging), all groups end up collapsed.

I know I can use GroupLoadMode="Client" and try to handle things in Javascript, but I'm not really sure where to begin with that.  I guess I'd prefer to not round-trip to the server, but I'll take any code that works at this point. 

Thank you!
Quinten
Top achievements
Rank 1
 answered on 03 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?