Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.0K+ views
Hi,
One of RadGrids in my application is having large number of columns. TableLayout of MasterTableView is "Fixed".
I have explicitly set width for each column so that when all columns are made visible, they all are displayed correctly.
But by default only few columns are visible and they are automatically expanded to cover whole width of the grid.
I do not want some columns like checkbox columns to expand. I want them to be always of fixed width.
How can I achieve this??

I know this can be achieved by not specifying width of one of the columns, but then that column width reduces to 0 when more number of columns become visible.

Thanks
Tushar
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
633 views
Hello,

I added some three-state checkboxes like in the demo:

<telerik:RadButton ID="btnToggle" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton">
 <ToggleStates>
  <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleCheckbox" />
  <telerik:RadButtonToggleState Text="Filled" PrimaryIconCssClass="rbToggleCheckboxFilled" />
  <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleCheckboxChecked" />
 </ToggleStates>
</telerik:RadButton>

This works fine, but I want to disable the "Filled" state when clicking.
I want to set all three states server-side, but the user shouldn't be able to use the "Filled" state - he should be able to just switch between "unchecked" and "checked".

How can I achieve this?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
4 answers
127 views
I have a RadGrid which is bound to a stored Proc. There are columns in the stored proc that are not displayed in the grid, but I want to access their values.
For instance "IsNewProduct" is not displayed in the grid but I want to access its values when a row is selected.PLease let me know how to achieve this.
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
14 answers
452 views
Hi,
I am trying to visualize the fact that some dates are unavailable. I first tried to do this in Calendar_DayRender, but I was only able to disable the dates, not colorize them.

I then tried Calendar_PreRender, and added all unavailable dates (with formatting) into the calendars SpecialDays. What happened then was
1. still only disabled, no color.
2. when I go to next month, the backcolor appears. it then stays, and works ok.
3. ForeColor is never set. It seems that <span> overrides the styling. css for span is set by Telerik.

Any suggestions on how to fix this?
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
576 views
Hai All,

I am facing one problem in my website i am having one default.aspx page its not inheriting master page what i need when i open my site it will expire after 6mins for me whats happening for every pages its working fine every page is inheriting master page but this default.aspx is not inheriting master page so when i open default.aspx and doing something also its showing time out.so now i want to stop master page session time in this defult.aspx how to do.here i dont want to inherit master page and recreate bcz if i inherit master page so many issues will come so other than any solution is there plz tel me its urgent



Thanks  
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
3 answers
277 views
Hello All,

I have activated Avg facility by applying Aggregate="Avg", which works fine but when the column is having no data then also avg counts that and calculates wrong avg.

for example

column1
$
$
$44
$44
$44
Avg: $26.40

Actually it should be $ 44

How to avoid blanks and How to achieve that?

Thank you!
Vishal
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
1 answer
218 views
I have a radgrid with a checkbox column and textbox column as follows:

           this._RadGrid1.AllowFilteringByColumn = true;
            this._RadGrid1.AllowSorting = true;           
            this._RadGrid1.MasterTableView.AllowNaturalSort = true;          
            
            this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };
            this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };                                            
            this._RadGrid1.EnableLinqExpressions = false;         
 
            this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Products found.";
            this._RadGrid1.MasterTableView.Width = Unit.Percentage(100);
             
            this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
            this._RadGrid1.AllowMultiRowSelection = true;
             
             
            this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
            this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound;
 
            GridBoundColumn boundColumn = new GridBoundColumn();
            string columnName;
            
            #region RadGrid Columns
            GridClientSelectColumn selectAll = new GridClientSelectColumn();
            selectAll.UniqueName = "SelectOne";
            this._RadGrid1.MasterTableView.Columns.Add(selectAll);
//Other columns
            templateColumn = new GridTemplateColumn();
            templateColumnName = this._PriceDealProductBanTable.BillingAccountNumberColumn.ColumnName;
            this._RadGrid1.MasterTableView.Columns.Add(templateColumn);
            templateColumn.DataField = templateColumnName;
            templateColumn.ItemTemplate = new TextBoxTemplate(templateColumnName);
            templateColumn.HeaderText = "BAN";
            templateColumn.UniqueName = "BAN";           
            templateColumn.AllowFiltering = false;           

The textboxtemplate is as follows:
public class TextBoxTemplate : ITemplate
    {
        protected RadTextBox _textBox;
        string _columnName;
        public TextBoxTemplate(string columnName)
        {
            this._columnName = columnName;
        }
        public void InstantiateIn(System.Web.UI.Control container)
        {
 
            this._textBox = new RadTextBox();
            this._textBox.ID = this._columnName;
            container.Controls.Add(this._textBox);
            this._textBox.DataBinding += new EventHandler(_textBox_DataBinding);
        }
        void _textBox_DataBinding(object sender, EventArgs e)
        {
            RadTextBox txt = (RadTextBox)sender;
            GridDataItem container = (GridDataItem)txt.NamingContainer;
            txt.Text = ((DataRowView)container.DataItem)[this._columnName].ToString();
        }
    }

When I click on the textbox, I want the row to be automatically selected. How can I achieve this?
Also after selections are made, and i click on a row, all selections are disabled. I want to change this behaviour also. Deselect only happens when I click on the checkbox.
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2014
1 answer
182 views
I have a RadGrid as follows:

this._RadGrid1.AllowSorting = true;           
 this._RadGrid1.MasterTableView.AllowNaturalSort = true;          
 
 this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };
 this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };                                            
 this._RadGrid1.EnableLinqExpressions = false;         
 
 this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Products found.";
 this._RadGrid1.MasterTableView.Width = Unit.Percentage(100);
  
 this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
 this._RadGrid1.AllowMultiRowSelection = true;
  
  
 this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
 this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound;
 
 GridBoundColumn boundColumn = new GridBoundColumn();
 string columnName;
 
 #region RadGrid Columns
 GridClientSelectColumn selectAll = new GridClientSelectColumn();
 selectAll.UniqueName = "SelectOne";
 this._RadGrid1.MasterTableView.Columns.Add(selectAll);

the GridClientSelectColumn allows multiple selection, but clicking on a row de-selects all other rows.  I want the all rows to stay selected unless manually de-selected from the checkbox. How can I achieve this?
Princy
Top achievements
Rank 2
 answered on 09 Jul 2014
4 answers
179 views
I put the following code in the RadGrid1_PageIndexChanged event:

if ((e.NewPageIndex + 1) == rgResults.PageCount)
{
    showingRowsTo = GridSource.Tables[0].Rows.Count;
}
else
{
    showingRowsTo = (e.NewPageIndex + 1) * rgResults.PageSize;
}
  
string rowCount = string.Format("Displaying {0}-{1} of {2}", showingRowsFrom, showingRowsTo, GridSource.Tables[0].Rows.Count);
lblResultsCountBottom.Text = lblResultsCountTop.Text = rowCount;


Unfortunately, it looks like this doesn't do a full postback and the label doesn't end up getting updated. How can I go about doing this? I tried doing it client side and had problems with this, too. It says $find is undefined.

$(document).ready(function () {
    var grid = $find("<%=rgResults.ClientID%>");
    var mtv = grid.get_masterTableView();
    var pageIndex = mtv.get_currentPageIndex();
    alert(pageIndex);
});
Jesse
Top achievements
Rank 1
 answered on 08 Jul 2014
2 answers
298 views
Hi,

Can you please provide some suggestion on creating a chart on server side and export SVG out of it to create vector graphics/pdf.

We have an application which runs as a scheduler on the server, generates charts and emails them to customers in PDF/Images. All this without any manual interaction.

I looked at RadChart and RadHTMLChart. RadChart is a server side compontent but can't export vercor graphics, and RadHtmlChart renders SVG strictly the on browser.

The problem with using RadHtmlChart is we have to run a browser object from server side code to execute JS which can be a 'not so' reliable solution.

Please suggest. Thanks!
Raghu
Top achievements
Rank 1
 answered on 08 Jul 2014
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?