Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views

Hi, i'm starting with Telerik.

I'm trying to understand a particular behavior about RowIndex. I'm checking RowIndex of each GridViewItem and it's not going like expected.

Instead of list 1,2,3 it's showing 2, 4, 6. I'm wondering why is it happening.

 

Vessy
Telerik team
 answered on 11 Dec 2020
7 answers
539 views

Hi there,

I am using the RadCheckBoxList and I want to color an individual ButtonListItem.
The attributes propery is not available, so I am not able to set the styling of an individual item.
                RadCheckBoxList radCheckBoxList = (RadCheckBoxList)radPanelItem.Items[0].FindControl("radCheckBoxList");

                if (radCheckBoxList != null)
                {
                    // Iterate items.
                    foreach (ButtonListItem radCheckBoxItem in radCheckBoxList.Items)
                    {
                        // Set ValueID.
                        string valueID = radCheckBoxItem.Value;
 
                        //
                        string text = radCheckBoxItem.Text;
 
                        // Calculate total checkbox.
                        int total = CalcCheckBoxTotal(propertyID, valueID, partTable, getPartValuesByCommodityCode.PartValueTable);
                        radCheckBoxItem.Text = text + " (" + total + ")";
 
                        // Set color checkbox to silver when total.
                        if (total == 0)
                        {
                            // radCheckBoxItem.Attributes.Add("style", "color:Silver;");
                        }
                    }
                }

The property is available when you use the regular System.Web.UI.WebControls.CheckBoxList control.
Any idea how to set the color of an individual item?

Regards,

Marcel

Rumen
Telerik team
 answered on 10 Dec 2020
1 answer
193 views

Good Day:

  I need to copy the contents out if a cell in a row.  I am able to highlight the text, but when I try to right click, I am unable.  Any thoughts on the settings I need to change to allow for this?

The setting for my grid are below.

  <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" datasourceid="sqldsJobs" 
        AllowFilteringByColumn="True" Skin="Telerik" Height="350px" AutoGenerateColumns="False" AllowPaging="True" GridLines="None" > 

        <MasterTableView ClientDataKeyNames="ukid" AllowMultiColumnSorting="true" DataKeyNames="ukid" datasourceid="sqldsJobs" CommandItemDisplay="Top">

 

        <CommandItemSettings ExportToPdfText="Export to Pdf" ShowAddNewRecordButton="False"  ShowExportToExcelButton="True"></CommandItemSettings>

        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

        <Columns>   .....        </Columns>

        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
         </EditFormSettings>

        </MasterTableView>
   <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings> 

        <FilterMenu EnableImageSprites="False"></FilterMenu>

        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>

 

 

Thanks,

 

Omar

Rybovich IT Department
Top achievements
Rank 1
 answered on 10 Dec 2020
1 answer
150 views

I am trying to get all filter editors to have the same width and look align.

Please help, I am new here, still learning.

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 09 Dec 2020
22 answers
359 views
Hi,

I am having issues with the following server for the CDN: aspnet-scripts.telerikstatic.com

See attached Firebug screengrab showing the delay.

This happens consistently, and is getting very, very frustrating.

Any ideas?

Cheers,
-alex
Rumen
Telerik team
 answered on 09 Dec 2020
4 answers
289 views

How can I display a "loading" message while data is loading with radgird when using a SERVICE ?

I am calling a service routine that takes a bit to return data.

How can I display a loading type message?

        <DataBinding Location="WaterWebService.asmx" SelectMethod="GetWaterAccounts" SelectCountMethod="GetCount" />

 

 

Full grid code: 

 

 <telerik:RadGrid RenderMode="Lightweight" AllowSorting="true" ClientSettings-Resizing-AllowColumnResize="true" VirtualItemCount="1000" PageSize="10" AllowPaging="true" 
           AllowCustomPaging ="true"  AllowFilteringByColumn="true" ID="RadGrid1" CssClass="gridy" runat="server" GridLines="None">
           <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" HideStructureColumns="false"  FileName = "PlannedOrderExc">
                                <Excel Format="Biff" />
                   </ExportSettings> 
          <MasterTableView TableLayout="Fixed" ClientDataKeyNames="ID" PagerStyle-Position="Bottom"   
PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-PageSizes="10, 15, 20, 25, 30" >
              <Columns>
                  <telerik:GridBoundColumn DataField="ID" HeaderText="" HeaderStyle-Width=".1" Visible="true" Display="false"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="AccountNumber" HeaderStyle-Width="20" HeaderText="Account Number" FilterControlWidth="80px" DataType="System.String"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="PropertyName" HeaderStyle-Width="50px" Visible="true" HeaderText="Property" FilterControlWidth="190px" DataType="System.String"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="LastName" HeaderStyle-Width="50" HeaderText="Responsible Party" FilterControlWidth="80px" DataType="System.String"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn Visible="false" DataField="PropertyID" HeaderText="ID"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn Visible="false" DataField="StatedPartyID" HeaderText="ID"></telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Notes"  HeaderText="Notes" HeaderStyle-Width="90px" ItemStyle-Wrap="false" FilterControlWidth="200px" DataType="System.String"></telerik:GridBoundColumn>
                  <telerik:GridCheckBoxColumn runat="server" AllowFiltering="false" HeaderStyle-Width="20" UniqueName="DepositRequired" HeaderText="Deposit Required?" DataField="DepositRequired" ItemStyle-HorizontalAlign="Center" />
                  <telerik:GridCheckBoxColumn runat="server" AllowFiltering="false" HeaderStyle-Width="20" UniqueName="DepositPaid" HeaderText="Deposit Paid?" DataField="DepositPaid" ItemStyle-HorizontalAlign="Center" />
                  <telerik:GridCheckBoxColumn UniqueName="NLM" AllowFiltering="false" HeaderStyle-Width="20" HeaderText="Managed" DataField="NLM" ItemStyle-HorizontalAlign="Center" />
                  <telerik:GridCheckBoxColumn UniqueName="WaterStatus" AllowFiltering="false" HeaderStyle-Width="20" HeaderText="Water ON?" DataField="WaterStatus" ItemStyle-HorizontalAlign="Center" />
                  <telerik:GridBoundColumn DataField="ModifiedBy" HeaderStyle-Width="20" HeaderText="Modified By" FilterControlWidth="80px" DataType="System.String" Visible="true" Display="false"></telerik:GridBoundColumn>
                
              </Columns>
          </MasterTableView>
          <ClientSettings>
              <Selecting AllowRowSelect="true"></Selecting>
              <DataBinding Location="WaterWebService.asmx" SelectMethod="GetWaterAccounts" SelectCountMethod="GetCount" />
              <ClientEvents OnRowSelected="rowSelected" OnDataBound="OnDataBound" OnRowDataBound="RowDataBound" ></ClientEvents>
              <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
          </ClientSettings>
      </telerik:RadGrid>

Attila Antal
Telerik team
 answered on 09 Dec 2020
2 answers
392 views
I'm attempting to load an Excel spreadsheet into the Spreadsheet control (which, I've been able to do dynamically). However, our spreadsheets have more than a single line of text and therefore need to have auto height set to the entire worksheet versus per row. How would we go about doing this? I've read the documentation about setting specific row(s) auto-height, but nothing for setting the entire worksheet to have auto-height rows.
Dave
Top achievements
Rank 2
 answered on 08 Dec 2020
0 answers
291 views

Give a grid with multiple columns. How can I hide column that has no value?

I ve tryed  something like this :

protected void RG_Import_PreRender(object sender, EventArgs e)
{
    foreach (GridColumn col in RG_Import.Columns)
    {
        bool valueFound = false;
        foreach (var row in RG_Import.Rows)
        {
            var cell = row.Cells[col.Name].Value;
            if (cell != null && cell != DBNull.Value && !string.IsNullOrWhiteSpace(cell))
            {
                valueFound = true;
                break;
            }
        }
        col.Visible = valueFound;
    }
}
Pierre
Top achievements
Rank 1
 asked on 08 Dec 2020
23 answers
1.0K+ views
The following code does not work when the toolbar contains any RadToolBarDropDown objects:

RadToolBar1.Items.FindItemByValue("buttonValue").Visible = true;

It results in the following exception:

Value property is not supported by RadToolBarDropDown
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Exception: Value property is not supported by RadToolBarDropDown

This makes using it very difficult (indeed impossible).

I note that this has come up before but it seems like the problem is being ignored

 

Peter Milchev
Telerik team
 answered on 07 Dec 2020
1 answer
527 views

Hi,

 

I have a databound radgrid and I need to get and set the value of a checkbox column client side.

I'm using the following for the other columns, which I have adapted from code found on this site.

 

    var myMasterTable = Grid.get_masterTableView();
    var myCell = myMasterTable.getCellByColumnUniqueName(myMasterTable.get_dataItems()[myRowIndex - 1], ColumnName);
    var myCellValue = myCell.innerHTML;
    if (myCellValue == "&nbsp;") { myCellValue = ""; }
    return myCellValue;

 

But unlike the other columns it returnsthe below html and not the actual value?

"<span class="aspNetDisabled"><input id="grid_Properties_ctl00_ctl04_ctl50" type="checkbox" name="grid_Properties$ctl00$ctl04$ctl50" checked="checked" disabled="disabled"></span>"

 

How do I get the checked state and also set the checked state via javascript? Is their abuilt in method for this?

 

Thanks in advance

Vessy
Telerik team
 answered on 07 Dec 2020
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?