Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
224 views
I am having trouble when resizing columns. I think it has to do with setting the filtering textbox widths on item rendering, but, I have to do this or the filtering textboxes do not fit within the columns (see filterboxnotfixed.gif attached).

When the grid first appears the columns and filter row matchup with the data table columns (see before.gif attached), however, when I go to resize column 3 everything gets messy (see after.gif attached).

Do you have any suggestions on how to resize the filter textboxes when column resizing occurs?

protected void RadGridAggressiveMatches_ItemCreated(object sender, GridItemEventArgs e)

{

if (e.Item is GridFilteringItem)

{

GridFilteringItem filteringItem = e.Item as GridFilteringItem;

 //set dimensions for the filter textbox
TextBox box = filteringItem["Column1"].Controls[0] as TextBox;
box.Width = Unit.Pixel(50);

box = filteringItem["Column2"].Controls[0] as TextBox

box.Width = Unit.Pixel(50);

box = filteringItem["Column3"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column4"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column5"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column6"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column7"].Controls[0] as TextBox;

box.Width = Unit.Pixel(15);

box = filteringItem["Column8"].Controls[0] as TextBox;

box.Width = Unit.Pixel(45);

}

}

 
<telerik:RadGrid ID="RadGridAggressiveMatches" runat="server" Width="1100px" Height="250px" DataMember="Aggressive Members"

 GridLines="None"

 AllowSorting="True"

 ShowFooter="True"

 Skin="Office2007"

 AutoGenerateColumns="False"

 AllowFilteringByColumn="True"

 onitemcreated="RadGridAggressiveMatches_ItemCreated"

 onselectedindexchanged="RadGridAggressiveMatches_SelectedIndexChanged"

 onsortcommand="RadGridAggressiveMatches_SortCommand"

 onneeddatasource="RadGridAggressiveMatches_NeedDataSource" >

 <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">

 <Selecting AllowRowSelect="True" />  

 <Scrolling AllowScroll="true" />

 <Resizing AllowColumnResize="true" AllowRowResize="true" ResizeGridOnColumnResize="false" />

 </ClientSettings>

 <MasterTableView TableLayout="Fixed" AllowFilteringByColumn="true" >

 <Columns>

 <telerik:GridBoundColumn UniqueName="Column1" DataField="Column1" HeaderText="Column 1" DataType="System.Int32"

 SortExpression="Column1" AllowFiltering="true" AutoPostBackOnFilter="false">

 <HeaderStyle Width="75px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column2" DataField="Column2" HeaderText="Column 2" DataType="System.Int32" SortExpression="Column2">
<HeaderStyle Width="75px" />
<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column3" DataField="Column3" HeaderText="Column 3" DataType="System.String"

 SortExpression="Column3">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column4" DataField="Column4" HeaderText="Column 4" DataType="System.String"

 SortExpression="Column4">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column5" DataField="Column5" HeaderText="Column 5" DataType="System.String" SortExpression="Column5">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column6" DataField="Column6" HeaderText="Column 6" DataType="System.String" SortExpression="Column6">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column7" DataField="Column7" HeaderText="Col 7" DataType="System.Int32" SortExpression="Column7">

 <HeaderStyle Width="40px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridTemplateColumn UniqueName="Column8" HeaderText="Column 8" SortExpression="Column8">

 <HeaderStyle Width="70px" />

 <ItemTemplate>

 <asp:RadioButtonList ID="RadionButtonListDecision" runat="server" RepeatDirection="Vertical">

 <asp:ListItem Value="1" Text="Yes"></asp:ListItem>

 <asp:ListItem Value="2" Text="No"></asp:ListItem>

 </asp:RadioButtonList>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

 </Columns>

 </MasterTableView>

 <FilterMenu Skin="Office2007" EnableTheming="True">

 <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 </FilterMenu>

 </telerik:RadGrid>

Eyup
Telerik team
 answered on 01 Aug 2012
1 answer
87 views
We attempting to use the Grid and Editor in a similar manner as demonstrated in the Rad Gird Demo  'Save in Database'. http://demos.telerik.com/aspnet-ajax/editor/examples/saveindatabase/defaultcs.aspx   For the most part the code works within our asp.net project excepting the Grid does not perform as expected.  <see attachment>  The user scenario;  The user selects 'edit' of an item as in Panel A of the attachment, the user abandons the edits by doing nothing to the the item,  The user selects 'edit' of the second item and the RadGrid renders an incomplete view of the items as shown in Panel B of the attachment.   Any suggestions are appreciated.
 Cheers,
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
257 views
hi
i want to create form builder in webForms .
how can i make this with form Element in Editor ?
how can I access to form elements in codeBehind C#?
I want to insert to Database from Elements .
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
170 views
Hi all,
      I need the primary key value in update command. Quick help will be appreciated.
thanks
Savyo
Princy
Top achievements
Rank 2
 answered on 01 Aug 2012
2 answers
112 views
I need to be able to serialize a collection of EditorFormatSet objects, but the class is not marked [serializable]. I suspect I will have the same problem with EditorFormatSetAttribute.

Can this be changed? Can you think of a workaround? (I tried using a wrapper class, but it didn't help)

I am using 2012.1.411.40
Dan Ehrmann
Top achievements
Rank 1
 answered on 01 Aug 2012
2 answers
204 views
Is there any way to remove of customize the summary attribute that is included with the HTML <table> that wraps the combobox code? The default value (summary="combobox") is a bit too vague and confusing for screen readers.  I am currently using the web UI components from 2008 (e.g. FILEVERSION 2008, 2, 826, 20).

Thanks.
Ivan Zhekov
Telerik team
 answered on 01 Aug 2012
1 answer
204 views
I am using Asp.net ajax telerik rad chart to create  some reports. Chart which i am using is bar chart with one series. I would like to increase the space between each bars in the chart. Please find the attachment.

Rosko
Telerik team
 answered on 01 Aug 2012
1 answer
118 views

Hi Telerik

 We decided to use your new feature (Multi columns) in a RadGrid.

 
<telerik:GridCheckBoxColumn DataField="Image" HeaderText="Image" ColumnGroupName="Image" />

 

In our scenario we are dynamically adding controls to a header cell.

 protected void RadGridImages_ItemCreated(object sender, GridItemEventArgs e)

 {

     if (e.Item is GridHeaderItem)

     {

         GridHeaderItem headeritem = (GridHeaderItem)e.Item;

         CheckBox checkBox = new CheckBox();

         checkBox.Checked = ShowAll;

         checkBox.Text = "Show all";

         checkBox.ID = "CheckBoxShowAll";

         checkBox.AutoPostBack = true;

         checkBox.CheckedChanged += new EventHandler(checkBox _CheckedChanged);

         headeritem["ShowAll"].Text = "Show all";

         headeritem["ShowAll"].Controls.Add(checkBox);

     }

 }

 

It works perfect without using the multi columns function. However, a problem by adding a control dynamically occurs. We have obtained this error:

 “Specified argument was out of the range of valid values. Parameter name: index”

Is there any way to dynamically add control to header cell in case of using multi column function, please?

By removing the information about group and group definition, everything works perfect again. When we apply multi columns functionality and delete the functionality of dynamically control adding, everything works well too.

Thank you in advance for your advice.

Pavlina
Telerik team
 answered on 01 Aug 2012
2 answers
270 views
Hello, I have a problem with the property width of control radcombobox within a Iframe and the IFrame is within a RadPageView.
the radComboBox is render with table with="0px". Is this a bug with IE8 and IE9?. I look fine in other browsers.

Code:
  <telerik:RadTabStrip ID="rtsDetail" runat="server" MultiPageID="rmpDetail">
            <Tabs>
                <telerik:RadTab runat="server" PageViewID="rpvCO" Text="Customer Order">
                </telerik:RadTab>
                <telerik:RadTab runat="server" PageViewID="rpvWO" Text="WorkOrder">
                </telerik:RadTab>
                <telerik:RadTab runat="server" PageViewID="rpvOP" Selected="True" 
                    Text="Operations">
                </telerik:RadTab>
                <telerik:RadTab runat="server" PageViewID="rpvEDI" Text="EDI">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="rmpDetail" runat="server" Height="100%">
                                    <!-- Begin Details Tabs -->
            <telerik:RadPageView ID="rpvCO" runat="server" 
                Height="100%">
            <telerik:radcombobox ID="RadComboBox5" Runat="server">
                <Items>
                    <telerik:RadComboBoxItem Value="1" Text="Uno" />
                    <telerik:RadComboBoxItem Value="2" Text="Dos" />
                    <telerik:RadComboBoxItem Value="3" Text="Tres" />
                </Items>
                </telerik:radcombobox>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rpvWO" runat="server" Height="100%">
               <iframe width='100%' src='WebCombo.aspx' height='100%' scrolling='yes'></iframe>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rpvOP" runat="server" Height="100%">
                <telerik:radcombobox ID="RadComboBox3" Runat="server">
                <Items>
                    <telerik:RadComboBoxItem Value="1" Text="Uno" />
                    <telerik:RadComboBoxItem Value="2" Text="Dos" />
                    <telerik:RadComboBoxItem Value="3" Text="Tres" />
                </Items>
                </telerik:radcombobox>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rpvEDI" runat="server" Height="100%">
                <telerik:radcombobox ID="RadComboBox4" Runat="server">
                    <Items>
                        <telerik:RadComboBoxItem Value="1" Text="Uno" />
                        <telerik:RadComboBoxItem Value="2" Text="Dos" />
                        <telerik:RadComboBoxItem Value="3" Text="Tres" />
                    </Items>
                </telerik:radcombobox>
            </telerik:RadPageView>
                                    <!-- End: Details Tabs -->
                                </telerik:RadMultiPage>


Code WebCombo.aspx

<div>


          <telerik:RadScriptManager ID="sp" runat="server">
          </telerik:RadScriptManager>
          <telerik:RadComboBox ID="rcbEquipment" runat="server" AllowCustomText="false" MarkFirstMatch="false"
            EnableLoadOnDemand="false" HighlightTemplatedItems="true" EnableTextSelection="false"
             Width="100%" EmptyMessage="" DropDownWidth ="130px" Height="50px"  >
            <ItemTemplate>
                <asp:CheckBox runat="server" ID="chk1"  />
                <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">
                <%# Eval("Value") %>
                </asp:Label>
            </ItemTemplate>
        </telerik:RadComboBox>
    </div>

I attach picture of html render.


I use telerik Telerik.Web.UI_2012_1_411


I hope some comment. 

Ivan Zhekov
Telerik team
 answered on 01 Aug 2012
2 answers
252 views
Hello,

I added a rad captcha control, a button and  the "validationgroup" to each of the controls to a page that has nothing else.

On Page Load I added the following code:
        If RadCaptcha1.IsValid Then
            Response.Write("Valid")
        Else
            Response.Write("NOT VALID")
        End If

I get "Valid" when the page loads and there is no text in the captcha textbox.

what am I missing?

Please help - thank you.
Slav
Telerik team
 answered on 01 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?