Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
242 views
Hi

I'm using telerik.web.ui version 2013.1.220.35 and was wondering if the following is a known bug.
On a radgrid when I apply an "ItemStyle-VerticalAlign" property in the MasterTableView, instead of in the individual columns, then (at least for) the GridEditCommandColumn and GridDropDownColumn, the style gets applied to every alternate row only.

For the skeletal mark up listed below, notice that the MasterTableView defines ItemStyle-VerticalAlign="Top".
See attached screenshot for this markup. you will see that the Edit Image and the text in the "Type"  column is "Top" aligned only on alternate rows. To make these values Top aligned on every row, I need to specify the ItemStyle-VerticalAlign on each column.

So I was wondering if 
a - This is a known issue with specifying  ItemStyle-VerticalAlign in the MasterTableView
b - There is a way so that I can specify this value in a single place on the radgrid so that it correctly applies to all columns.

<telerik:RadGrid
    ID="NotesGrid"
    runat="server"
    DataSourceID="sqlGetNotes">
 
    <MasterTableView
      ItemStyle-VerticalAlign="Top ">
 
      <Columns>
 
        <telerik:GridEditCommandColumn
          ButtonType="ImageButton"
          UniqueName="EditCommandColumn"
          HeaderText="Edit"
          HeaderTooltip="Edit Note"
          HeaderStyle-width="80px"
          HeaderStyle-HorizontalAlign="Center"
          ItemStyle-HorizontalAlign="Center"
          ItemStyle-CssClass="MyImageButton" />
 
        <telerik:GridDropDownColumn
          UniqueName="Note_Type"
          DataField="Note_Type"
          HeaderText="Type"
          DataSourceID="sqlNoteTypesLookupList"
          ListValueField="Note_Type"
          ListTextField="Note_Type"
          DropDownControlType="RadComboBox"  />
 
      </Columns>
    </MasterTableView>
  </telerik:RadGrid>


Thanks

Galin
Telerik team
 answered on 30 Mar 2013
1 answer
80 views
I have two grids on the page. Both are configured to use the OnNeedDataSource event. The detail grid is rebound in the OnSelectedIndexChange of the master grid.  The detail grid has an edit template with a dropdownlist.  The dropdown list is bound to an ObjectDataSource.  I'm attempting to bind the dropdownlist in the following event handler;

protected void ModelGrid_OnItemDataBound(object sender, GridItemEventArgs e)
{
   if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
   {
        GridEditFormItem editform = (GridEditFormItem)e.Item;
        DropDownList ddlAType = (DropDownList)editform.FindControl("ddlAssetType");
        if (ddlAType != null)
            ddlAType.DataBind();
   }
}

However, before it can get here, I get an error: "Sys.WebForms.PageRequestManagerServerErrorException: 'ddlAssetType' has a SelectedValue which is invalid because it does not exist in the list of items."

The code doesn't hit a breakpoint set in the OnSelect method of the ObjectDataSource, so the dropdownlist hasn't been bound yet. What am I doing wrong?


Steven
Top achievements
Rank 1
 answered on 30 Mar 2013
6 answers
94 views
See attached screenshot.

Does anyone know how to remove the column border lines?  I'd like to remove the one in between the final 2 columns in the screen shot (the one right before the Delete (X) button).

Also, when I'm using the Tab key to move from column to column, I'd like to prevent the Delete (X) button from being able to be tabbed to.  Any ideas on how to do this?

Thanks again.
J
Top achievements
Rank 1
 answered on 29 Mar 2013
10 answers
218 views

I have a column in my grid for entering a zip code and it is defined as:
                           
<telerik:GridMaskedColumn ConvertEmptyStringToNull="False" DataField="ZipCode" DataFormatString="{0:####-#####}"
    FilterControlAltText="Filter ZipCode column" HeaderText="Zip Code" Mask="#####-####"
    SortExpression="ZipCode" UniqueName="ZipCode" EmptyDataText="">
    <ColumnValidationSettings EnableRequiredFieldValidation="True">
        <RequiredFieldValidator ErrorMessage="* Required"></RequiredFieldValidator>
    </ColumnValidationSettings>
    <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="70px" />
    <ItemStyle Width="100%" HorizontalAlign="Left"></ItemStyle>
</telerik:GridMaskedColumn>

I want to use the following control to edit it:

<telerik:GridMaskedColumnEditor runat="server" ID="txtGridEdit_Zip" MaskedTextBox-Width="90%">
    <MaskedTextBox runat="server" LabelCssClass="" LabelWidth="64px" DisplayMask="#####-####"
        Mask="#####-####" PromptChar=" " TextWithLiterals="-"></MaskedTextBox>
</telerik:GridMaskedColumnEditor>


If I leave the <MaskedTextBox> line in, it crashes out and won't let me save.  BUT, if I remove JUST the <MaskedTextBox> line, it works but then I have no way to adjust the styling of the editor.

Anyone else run into this or know of an example that works that you could point me to?

Thanks.
J
Top achievements
Rank 1
 answered on 29 Mar 2013
4 answers
159 views
I have a grid that uses a MaskedTextField for a Zip Code column defined as:

<telerik:GridMaskedColumn ConvertEmptyStringToNull="False" DataField="ZipCode" DataFormatString="{0:#####}"
    FilterControlAltText="Filter ZipCode column" HeaderText="Zip Code" Mask="#####"
    SortExpression="ZipCode" UniqueName="ZipCode" EmptyDataText="" ShowSortIcon="False">
    <ColumnValidationSettings EnableRequiredFieldValidation="True">
        <RequiredFieldValidator ErrorMessage="* Required"></RequiredFieldValidator></ColumnValidationSettings>
    <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header" />
    <ItemStyle Width="100%" HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
</telerik:GridMaskedColumn>


If you look at the attached screen shot of what it looks like in Edit mode, you'll see that the text box used during edit is sized well beyond the width of the column.  I have tried changing it to the following but it has no impact.

<telerik:GridMaskedColumn ConvertEmptyStringToNull="False" DataField="ZipCode" DataFormatString="{0:#####}"
    FilterControlAltText="Filter ZipCode column" HeaderText="Zip Code" Mask="#####"
    SortExpression="ZipCode" UniqueName="ZipCode" EmptyDataText="" ShowSortIcon="False" ColumnEditorID="txtGridEdit_Zip">
    <ColumnValidationSettings EnableRequiredFieldValidation="True">
        <RequiredFieldValidator ErrorMessage="* Required"></RequiredFieldValidator></ColumnValidationSettings>
    <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header" />
    <ItemStyle Width="100%" HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
</telerik:GridMaskedColumn>

<telerik:GridMaskedColumnEditor runat="server" ID="txtGridEdit_Zip">
    <MaskedTextBox LabelCssClass="" LabelWidth="0px" Width="98%" Mask="#####" DataFormatString="{0:#####}" DisplayMask="#####" HideOnBlur="True" />
</telerik:GridMaskedColumnEditor>


Any ideas on how I can get this text box to display using 98% of the field's width like I do all of the other fields?  I'm using the same approach for the other fields which work perfectly, only the MaskedColumn exhibits this behavior.

I know I made previous post regarding the error that occurs by using this code ('GridMaskedColumnEditor -> MaskedTextBox' declaration causes an error during runtime); so I'm hoping that someone else has used a different approach that has gotten around this.

Thanks.
J
Top achievements
Rank 1
 answered on 29 Mar 2013
3 answers
1.4K+ views
I'm checking if the internet is available or not by pinging my server. This method is called in onClientClicking event of the button.

If not connected to the internet I want to prevent the postback.
It displays 'Not connected to internet' message but after the user clicks 'OK' , it does a postback.

function checkinternetOnButtonClick(button, args) {
                $.ajax({
                    url: 'http://www.MyDomainName.com',
                    success: function() {
                           
 
                    },
                    error: function() {
                    alert('No internet connection available on button click!');
                    args.set_cancel(true);
                        return false;
                    }
                });
            }
<telerik:RadButton ID="btnBulkUpdate" runat="server" Text="Bulk Update" Width="150px"
                               Font-Size="Medium" OnClientClicking = "checkinternetOnButtonClick"   />
Danail Vasilev
Telerik team
 answered on 29 Mar 2013
1 answer
125 views
Hi everybody!
I have a problem. I want to display information to radgrid. I need format data but have a problems. Example :
I do:
2123244  I formated:  2123244.00
7424 I formated: 7424.00
1.22 I formated: 1.22
But I need:
2123244 I need format: 2 123 244
7424 I need format: 7 424
1.22 I need format:  1.22
(All in a radgrid)
Have you any ideas?
Thanks you very much!
Kostadin
Telerik team
 answered on 29 Mar 2013
1 answer
287 views
Hi,

On your default example of the async upload control, you have some text and images that appear before and after the upload control.
(see attachment: telerikasyncuploaddemo.jpg)

When I add anything in front or behind the control, it puts the control on it's own line.
(see attachment: howtogetallonsameline.jpg)

I've tried to trace your css to see how you're getting it all on one line and can't get it right...don't want to spend any more time on this...help!!!
Hristo Valyavicharski
Telerik team
 answered on 29 Mar 2013
3 answers
276 views
How do you set the width of the series line of the chart?
Like with my RadCharts I use <LineSeriesAppearance Width="1" />

Thanks
Danail Vasilev
Telerik team
 answered on 29 Mar 2013
4 answers
187 views
There seems to be a bug when a dropdownlist is placed in a RadWindow's ContentTemplate and is decorated by RadFormDecorator.

With RadFormDecorator, the RadWindow will appear with scrollbars.  Seems like RadFormDecorator screw up RadWindows AutoSize height calculation.

    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
    <telerik:RadWindow runat="server" ID="wUserForm" VisibleOnPageLoad="true" AutoSize="true">
        <ContentTemplate>
            <table>
                <tr>
                    <td>test</td>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server">
                            <asp:ListItem>aaaaaaaa</asp:ListItem>
                            <asp:ListItem>bbbbbbbb</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </telerik:RadWindow>


Marin Bratanov
Telerik team
 answered on 29 Mar 2013
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?