Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.7K+ views
HI,

Am not getting the Horizontal scrollbar for Radgrid .
Width of the all columns is greater than the width of the grid.
in UI only few columns are coming in the grid & Horizontal scroll bar is not coming .

below is my Code in UI:

 

<P><FONT color=#008000 size=2><FONT color=#008000 size=2><asp:Panel 
ID="Panel1" ScrollBars="None" runat="server" Width="100%" Height="100%" ></P>
<P></P>
<P><telerik:RadGrid ID="RadGrid1" AllowSorting="true" 
EnableEmbeddedSkins="False" ShowStatusBar="true"</P>
<P>ShowFooter="false" AllowPaging="true" EnableViewState="true" 
AutoGenerateColumns="False"</P>
<P>OnNeedDataSource="RadGrid1_NeedDataSource" ShowHeader="true" 
CellSpacing="1"</P>
<P>runat="server" OnDataBound="RadGrid1_DataBound"></P>
<P><PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" 
/></P>
<P><MasterTableView AllowPaging="true" AllowSorting="true" 
AutoGenerateColumns="false"</P>
<P>EditMode="InPlace" TableLayout="Auto" ></P>
<P><Columns> </P>
<P><telerik:GridTemplateColumn HeaderText="Action" </P>
<P>ItemStyle-CssClass="centerAlign" HeaderStyle-Width="10%" 
ItemStyle-Width="10%" ></P>
<P><ItemTemplate></P>
<P><asp:LinkButton ID="btnEdit" runat="server" </P>
<P>Text="Edit" CssClass="buttonLink" /></P>
<P></ItemTemplate></P>
<P><HeaderTemplate></P>
<P><asp:Button ID="btnDeleteAll" runat="server" Text="Delete All" 
OnClick="btnDeleteAll_Click" Visible="false" /></P>
<P><asp:Label ID="lblAction" runat="server" Text="Action" 
Visible="true"/></P>
<P></HeaderTemplate></P>
<P></telerik:GridTemplateColumn></P>
<P><telerik:GridTemplateColumn HeaderText="Change" HeaderStyle-Width="10%" 
ItemStyle-Width="10%" </P>
<P>ItemStyle-CssClass="centerAlign"></P>
<P><ItemTemplate></P>
<P><%# Eval("EVAL1")%></P>
<P></ItemTemplate></P>
<P></telerik:GridTemplateColumn></P>
<P><telerik:GridBoundColumn DataField="DataField1" HeaderText="HeaderText1" 
HeaderStyle-Width="12%" ItemStyle-Width="12%" ItemStyle-CssClass="centerAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField2" HeaderText="HeaderText2" 
ItemStyle-Width="12%" HeaderStyle-Width="12%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField3" HeaderText="HeaderText3" 
ItemStyle-Width="16%" HeaderStyle-Width="16%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField4" HeaderText="HeaderText4" 
ItemStyle-Width="20%" HeaderStyle-Width="20%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField5" HeaderText="HeaderText5" 
ItemStyle-Width="15%" HeaderStyle-Width="15%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField6" HeaderText="HeaderText6" 
ItemStyle-Width="15%" HeaderStyle-Width="15%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField7" HeaderText="HeaderText7" 
ItemStyle-Width="15%" HeaderStyle-Width="15%" ItemStyle-CssClass="leftAlign" 
/></P>
<P><telerik:GridBoundColumn DataField="DataField8" 
DataFormatString="{0:0,0.0000}" HeaderText="HeaderText8" HeaderStyle-Width="15%" 
ItemStyle-Width="15%" ItemStyle-CssClass="rightAlign" /></P>
<P><telerik:GridBoundColumn DataField="DataField9" 
DataFormatString="{0:0,0.00}" ItemStyle-Width="15%" HeaderStyle-Width="15%" 
HeaderText="HeaderText9" ItemStyle-CssClass="rightAlign" /></P>
<P><telerik:GridTemplateColumn HeaderText="HeaderText10" 
ItemStyle-Width="15%" HeaderStyle-Width="15%" </P>
<P>ItemStyle-CssClass="centerAlign"></P>
<P><ItemTemplate></P>
<P><asp:ImageButton ID="imgComments"</P>
<P>ImageAlign="AbsMiddle" CssClass="handCursor"</P>
<P>runat="server" Visible="false" /></P>
<P><span ID="span1" class="popupExtender" runat="server"></P>
<P><%# Eval("Eval2") %></P>
<P></span></P>
<P></ItemTemplate></P>
<P></telerik:GridTemplateColumn></P>
<P></Columns></P>
<P><NoRecordsTemplate></P>
<P>No Data Found</P>
<P></NoRecordsTemplate></P>
<P></MasterTableView></P>
<P><ClientSettings></P>
<P><Scrolling AllowScroll="true" SaveScrollPosition="false" 
ScrollHeight="163px" UseStaticHeaders="true" /></P>
<P><Selecting AllowRowSelect="true" /></P>
<P></ClientSettings></P>
<P></telerik:RadGrid></P>
<P></P>
<P></asp:Panel></P></FONT></FONT>

 

 

 


please help me ASAP.

Pavlina
Telerik team
 answered on 30 Apr 2013
1 answer
704 views
HI folks,

I've got myself a RadTextBox where the users are creating new records where one of the values is an SSN. From one of the examples I got the validation to make sure it's in the right format and that's working as expected. I'd like to add to the behavior so that it doesn't require the user to enter the dashes. In a best case scenario, the user could enter the dashes, or not, and the system will still accept the value.

This is whut I've got now:
<telerik:RadTextBox ID="txtSSN" runat="server" EmptyMessage="Enter valid SSN..." Width="250px"></telerik:RadTextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ValidationGroup="AddPatient" ErrorMessage="* Required Field" ControlToValidate="txtSSN" /><br />    
          <asp:RegularExpressionValidator id="ssnValidator" runat="server" Display="Dynamic" ErrorMessage="Invalid SSN format"
          ValidationExpression="\d{3}-\d{2}-\d{4}" ControlToValidate="txtSSN">

Thanks for the help.

MArk B.
Vasil
Telerik team
 answered on 30 Apr 2013
2 answers
100 views
   var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
    alert(tabStrip);

I am using Rad Tab Strip in my page. i want to get tabstrip object at javascript like coding above..
but it shows null in alert. how to resolve it?
aditya pratap
Top achievements
Rank 2
 answered on 30 Apr 2013
1 answer
99 views
Hi,

Is there a way to add a seperator inside RibbonBarMenuItem for the RibbonBar?

Thanks,
Bilal
Kate
Telerik team
 answered on 30 Apr 2013
4 answers
209 views
Hi,

I'm hoping someone can explain how to do what seems like a relatively straightforward task.  

I'm using radgrid to display a list of users bound to an Entitydatasource control .  To insert or edit the users I am using a FormTemplate for the edit/insert.

One of the fields for the user data is gender.  Rather than create a lookup table for this I wanted to create a combobox containing only the values (Not Selected, Male, Female).   The default value displayed on the combo-box for an insert should be Not Selected.  The default value
for an edit should be the underlying value from the db that has previously been selected.

If I bind the combo directly to the field I am given all the values that are currently in the table for that field (ie. Male, Male, Female, Not Selected).

Instead of this I want a combobox with only the above values, while it is also bound to the underlying entitydatasource and thus can have its selectedvalue set.

I've been through as many posts and articles as I can find that seem to be relevant but I still don't seem to be solving the problem some examples below.

http://www.telerik.com/help/aspnet-ajax/grid-with-combobox.html
http://www.telerik.com/help/aspnet-ajax/grid-operations-with-dropdownlist-in-edititemtemplate.html

If I implement the recommendation from the above article I do end up with a combo-box limited to the selected values but as it is not bound to the database I cannot retrieve the correct value on edit nor persist any selected values back the database using EF. 

It seems I'm missing something obvious here so please feel free to point it out to me as any help on this would be welcome.




Antonio Stoilkov
Telerik team
 answered on 30 Apr 2013
3 answers
151 views
Hi Telerik Team,


Good Morning.

I use two dropdownlists,multiple checkboxes are included in each dropdownlist, and second dropdownlist check box data must be changed accordingly to the selection of first dropdownlist check box data.


When I click frist dropdownlist and nothing do changes but second drop downlist selected data is missing although its checkboxes are still selected.


Please check my attached powerpoint.

Regards,
Aewin.



Hristo Valyavicharski
Telerik team
 answered on 30 Apr 2013
3 answers
195 views
Hi Peter,

One more for you to add to the list.  In the RadCombo there is a OnItemDataBound parameter.  Please add a OnNodeDataBound parameter to the DropDownTree control.

I'm going to be using these in a formview and as such the control isn't setup prior to runtime so for now I'm having to use AddHandler in the formview data bound event.

Many Thanks,

Jon
Jon
Top achievements
Rank 1
 answered on 30 Apr 2013
3 answers
84 views
I am experiencing a problem with RadGrids after exporting the grid information to Excel.  The problem is that after the export has taken place, the GridEditCommandColumn does not behave correctly.  I have placed a break in the code-behind for the grid in the OnItemCommand event, and I can see that when clicking the export button I see that the command name is ExportToExcel.  The export works correctly and the spreadsheet opens.  When I click edit in the GridEditCommandColumn, however, the command name in the OnItemCommand event is stil ExportToExcel.

Is there a step that I am missing?
Daniel
Telerik team
 answered on 30 Apr 2013
1 answer
315 views
It took me a bit to figure this one out so I'd figured I'd post my solution. If anybody knows of an easier way please update.

I basically just wanted to get the filter text typed into a RadComboBox if the form was posted without a selection being made with the filter text still in the box.

If you grab the client state of the posted RadComboBox, then deserialize the JSON into an object you can grab the text:

  public class comboBoxClientSate {
    public string[] logEntries { get; set; }
    public string value { get; set; }
    public string text { get; set; }
    public bool enabled { get; set; }
    public string[] checkedIndices { get; set; }
    public bool checkedItemsTextOverflows { get; set; }
  }
 
String clientState = Request.Form[(ComboBoxID.ClientID + "_ClientState"];
comboBoxClientSate ComboBoxIDClientState = new JavaScriptSerializer().Deserialize<comboBoxClientSate>(clientState);
 
 //this should be the entered filter text
ComboBoxIDClientState .text


James
Dimitar Terziev
Telerik team
 answered on 30 Apr 2013
5 answers
191 views
In this thread, some sample code was given to have a "show all" option in the page size dropdown. (AllPaging.zip). To reproduce the error:

1. Select "All" from the page size dropdown.
2. Click on either the "Next Page" or "Last Page" button to the left of the page size dropdown.
3. You will get a System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

See attached.

The same issue is happening in our production website where we are using this same code. Please advise.
Daniel
Telerik team
 answered on 30 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?