Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.6K+ views
I am writing to ask how best column width can be set RadGrid Columns - either in C#, or .aspx;

Thanks in advance for any insight - best regards;
<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" OnNeedDataSource="RadGrid2_NeedDataSource" AllowSorting="true" AllowFilteringByColumn="true" >
           <ClientSettings EnableRowHoverStyle="true">
               <Selecting AllowRowSelect="true" />
           </ClientSettings>
           <MasterTableView AllowMultiColumnSorting="True">
           
           </MasterTableView>
       </telerik:RadGrid>

public DataTable GetDataTable(string query)
    {
        String ConnString = "";
        //ConnString = ConfigurationManager.ConnectionStrings["CapacityManagement"].ConnectionString;
        ConnString = ConfigurationManager.ConnectionStrings[2].ConnectionString;
        SqlConnection conn = new SqlConnection(ConnString);
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand(query, conn);
 
        DataTable myDataTable = new DataTable();
 
        conn.Open();
        try
        {
            adapter.Fill(myDataTable);
        }
        finally
        {
            conn.Close();
        }
 
        return myDataTable;
    }

protected void RadGrid2_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
   {       
       (source as RadGrid).DataSource = GetDataTable("SELECT Date, Location, EquipmentType, InstalledPorts, UsedPorts, ReservedPorts, AvailablePorts, Utilization, ThreeMonthUtil, TwelveMonthUtil From tblSAMPortsLocationSummary");
   }

lv
Top achievements
Rank 1
 answered on 09 Oct 2015
3 answers
64 views

Hello,

 I just updated from Q2 2014 to Q3 2015 and run into a strange artifact.

 I've styled the RadComboBox using a custom ​style sheet(RadComboBox_​CUSTOM) and a custom image (rcbSprite). In the new version of Telerik all RadComboBox items now looked as they where focused by default - but not according to my CSS file, instead it seems to be a defallt background positioning).

I have tried to look what has beaked since last version we had, but cannot find anything. I've created a small test project for this issue.

 

Kind regards

 

Robert

 

Ivan Danchev
Telerik team
 answered on 09 Oct 2015
1 answer
157 views

Hello,

I will wish to clarify the following  properties :
- StorageClass
- ServerSideEncryptionMethod 
- CannedACL
 I do not see how, thank you for your help.

 Vincent

Hristo Valyavicharski
Telerik team
 answered on 09 Oct 2015
1 answer
163 views

Hi

 Is there a way to set the size of the exported PDF boxes in the org chart?

 I have quite a large org chart to export and it would be really useful if I could increase the size of certain boxes (for example, where a manager has many subordinates, I'd like the make the manager's box larger).

Is this possible?

 

Ivan Danchev
Telerik team
 answered on 09 Oct 2015
1 answer
74 views

I was trying to create an iframe in RadEditor, I encountered some javascript error. Even I can reproduce on RadEditor demo site.

Please see my video: http://screencast.com/t/LMiX8qm2 

 

Is it a known issue or if there is any solution?

 

Thanks a lot.

Ianko
Telerik team
 answered on 09 Oct 2015
9 answers
53 views
Does the DropdownList have a "Label" property like the ComboBox does?
Eyup
Telerik team
 answered on 09 Oct 2015
1 answer
45 views

Hello,

I want row selection when Shift + U​p or Down arrow key is press in RadGrid but not working in IE 11 specifically. My Telerik dll is 2011.1.519.35.

My Code is as follows

<telerik:RadGrid ID="dgHistory" runat="server" AutoGenerateColumns="false" onkeydown="CheckShiftKey(this,event)"
    AllowSorting="false" AllowMultiRowSelection="True" GridLines="None" Height="0px">
    <PagerStyle AlwaysVisible="false" />
    <SelectedItemStyle CssClass="ToothChartSelected" />
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    <MasterTableView DataKeyNames="ChartHistoryID">
        <HeaderStyle CssClass="ChartingRadGridColumnHeader" />
        <ItemStyle CssClass="ChartingRadGridRow" VerticalAlign="Top" />
        <Columns>
            <telerik:GridBoundColumn DataField="RType" HeaderText="Type" Display="false"
                UniqueName="RecordType" HeaderStyle-Width="80px">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RID" HeaderText="ID" Display="false" UniqueName="RecordID"
                HeaderStyle-Width="50px">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ID" HeaderText="OID" Display="false" UniqueName="OID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DDate" HeaderText="Date" UniqueName="DisplayDate"
                HeaderStyle-Width="55px" DataFormatString="{0:MM/dd/yy}">
            </telerik:GridBoundColumn>
       
        </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="false" AllowKeyboardNavigation="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
        <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="true" />
        <ClientEvents OnRowDataBound="function(s,e){ RowDataBound(s,e);}"  OnKeyPress="CheckShiftKey"
            OnRowContextMenu="OnContextMenu" OnRowClick="OnLeftClick" OnGridCreated="function(s,e){ BindGridHotkeys(s,e); SetHistoryGridHeight(s, e); tc$.historyGridCo=s;}"
            OnRowSelected="RowSelected" OnRowDblClick="onrowdblclick" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
        </Scrolling>
    </ClientSettings>
</telerik:RadGrid>​

and  client side script is

  function CheckShiftKey(sender, args) {
        var keyCode = args.get_keyCode();

        if (args.get_isShiftPressed()) {
            if (keyCode == 38 || keyCode == 40) {
                if (sender._activeRow != null) {
                    var nextRow = sender._getNextActiveRow(sender._activeRow, keyCode);
                    if (!nextRow) return;
                    var nextItem = $find(nextRow.id);
                    var currentItem = $find(sender._activeRow.id);
                    if (nextItem.get_selected()) {
                        currentItem.set_selected(false);
                    }
                }
            }
        }
    }

 

Thanks,

Prajwal Thakur

Pavlina
Telerik team
 answered on 08 Oct 2015
1 answer
81 views

Hi everyone,

We're in the market for a new tool for creating online help/documentation for our web application. Anybody have any suggestions?

Thanks,

Tom

Pavlina
Telerik team
 answered on 08 Oct 2015
1 answer
235 views
Dear,
I'm look for a way to export HTML to DOCX programmatically. We are saving content of the RadEditor in the database. Then we need to export this content to DOCX.
Thanks in advance,
Irf.
David
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 08 Oct 2015
1 answer
108 views

I am encountering an issue when combining RadMenu with LightWeight Rendering on a page with a RadGrid using Classic Rendering.   ​ Enabling Filtering on the Grid causes the submenu items on the RadMenu to appear incorrectly.  

 

I am using 2015.3.930.40   

 

If I render both controls with LightWeight rendering or render both controls with Classic rendering everything appears correctly.  It only appears incorrectly when Filtering is enabled on the grid.    

Pavlina
Telerik team
 answered on 08 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?