Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
168 views
Hi,

As per our requirement we are creating a Rad Grid programmatically(Telerik DLL Version 2009.3.1103.35).
We have added a GridMasked Column and provided it with data  that is alha numeric(String Datatype.eg  AC2334565).
The mask value is set to "(###) ## ###".
But when i execute the code this is not applied to the data and it show plain with formatting.
Here is my code snippet:
               objGridMaskedColumn = New Telerik.GridMaskedColumn
                With objGridMaskedColumn
                    .UniqueName = cColNameTelephone
                    .HeaderText = "Auth Code"
                    .DataField = "AuthCode"
                    .Mask = "(###) ## ###"
                End With
                gridSample.MasterTableView.Columns.Add(objGridMaskedColumn)

My requirement is that i need to store the data in the database with any format.But while displaying the same text on grid i want to apply formatting to it.As per my understanding GridMasked Column was for  that purpose.
The same can be seen in below demo for Masked Column: http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/columntypes/defaultcs.aspx


Any help is greatly appreciated.

Regards,
Aayam
Aayam
Top achievements
Rank 1
 answered on 27 Apr 2010
2 answers
169 views
Hi Experts,

I am using Simple DataBinding for my Grid with Viewstate enabled.There is altogether a different layer with function having fixed parameter set and provide with the custom business object collection to be bind to the Grid.

Limitations:
1) Every other functionality need is working fine with Simple Data Binding of Grid.
2) Specific parameter only to Database layer to retreive Bussiness Object collection.No modification can be made.

Scenario:
New Column introduced in Grid which takes concatenated data from two different properties in Custom Bussiness object the displays it.Hence if we give datafield name as one Property the filtering would be applicable to data from that property only.But we need the filtering to work both the  properties that act as datasource to this column.

Approach:
Customize the filter in ItemCommand event for this column.

Issues:
1) Customized the filter, set it to Grid.MasterTableView FilterExpression and called ReBind() on Grid.MasterTableView, but still not working.
2) Customized the filter, set it to Grid.MasterTableView FilterExpression and explicitly bind the grid by provided it again with datasource.Hence set the DataSource again with fixed Bussiness Object Collection and called DataBind() explicitly.

I can definetly try for Advance Binding but i want to avoid  that for now because would have to modify whole page to support other functionalities related to application itself.

Both of them are not working.
Any idea would be greatly appreciated.

Regards,
Aayam Singh
Aayam
Top achievements
Rank 1
 answered on 27 Apr 2010
1 answer
97 views
I'm looking for an example of a simple search page with radgrid results using ajax.

I have 4 text fields
One "search" button
One ajaxified radgrid with results, with a message to narrow search parameters with more than a couple hundred results.

I think I need to use RadGrid1_NeedDataSource in order to avoid a null search when the page loads?

Since there are so many great demo's on this site.. surely there must be one for something like this?

Thanks..

Shinu
Top achievements
Rank 2
 answered on 27 Apr 2010
11 answers
104 views

Hi all,

I have a tab control on some page. the tab contains more controls. now for the first time if i try to scroll down in the tab control the tab heading is moving along. please find the screen shots in attachments.

Please help me out in this.

Thanks in advance.

Suhas TJ
Top achievements
Rank 1
 answered on 27 Apr 2010
0 answers
77 views
I have defined the tabindex property on each of the webcontrols of my page, so I have 2 webcontrols with autopostback="true", but after the callback the tabindex order is lost. How can I preserve the current order(tabindex) after a callback(postback) is fired?

benitolopez_sistemas
Top achievements
Rank 1
 asked on 27 Apr 2010
2 answers
191 views

When using the GridExcelBuilder to add a new cell (and row) to a worksheet when exporting from the RadGrid, is there a way to specify the width of the cell as in the pseudo-code below?

protected void Grid_ExcelMLExportRowCreated ( object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e )  
{  
    if ( e.RowType == GridExportExcelMLRowType.HeaderRow )  
    {  
        RowElement myNewRow = new RowElement();  
        CellElement myNewCell = new CellElement();  
        myNewCell.StyleValue = "myNewStyle";  
        myNewCell.MergeAcross = e.Row.Cells.Count - 1;  
        //is there something like the property below? 
        myNewCell.Width = 200;  
        //etc...  
    }  
}  

Thanks,

Keith
Martillo
Top achievements
Rank 2
 answered on 27 Apr 2010
2 answers
98 views

I have a  combobox with  a treeview ( tvCategory) inside it. ON the same web page I have a asp panel and on which I have a user Control.

I am trying to use AJAXManagerProxy control. ON treeview node change I want to update panel on the web page. Following code I have used for this.

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

    <AjaxSettings>

       <telerik:AjaxSetting AjaxControlID="tvCategory">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="tvCategory" />

                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" LoadingPanelID="RadAjaxLoadingPanel1" />

                    <telerik:AjaxUpdatedControl ControlID="txtNAme" LoadingPanelID="RadAjaxLoadingPanel1" />

                </UpdatedControls>

        </telerik:AjaxSetting>

</telerik:RadAjaxManagerProxy>

On NodeClick event I am trying to set properties of user control.

      Protected Sub tvCategory_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs)

 

            If e.Node.Value.ToString <> vbNullString Then

                  Category1.CategoryID = New Guid(e.Node.Value.ToString) 'setting up User control's  categoryId property

                  Category1.LoadCategory = True

            End If

 

            pnlDetail.Visible = True

      End Sub

Page Load of the user control is called before NodeClick event  and I am not able to get the data because I need to know the node selected value to set up on the user control.

How do I do this?

Thanks is advance!!!

A K
Top achievements
Rank 1
 answered on 26 Apr 2010
2 answers
165 views
I want to duplicate the look of a RadGrid "Previous Page" button outside of the grid.  I'm using RadFormDecorator and RadSkinManager for all controls.  The following code does not work.

Dim btPrev As New Button  
btPrev.Attributes.Add("CssClass", "rgPagePrev") 
Wyatt
Top achievements
Rank 1
 answered on 26 Apr 2010
2 answers
79 views



<telerik:RadGrid ID="grd" runat="server"   
   AllowPaging="True" 
PageSize="20"                
Skin="Vista" 
GridLines="None" 
AllowSorting="true"   
OnExcelMLExportRowCreated="grdBundles_ExcelMLExportRowCreated" 
OnExcelMLExportStylesCreated="grdBundles_ExcelMLExportStylesCreated"   
onsortcommand="grdBundles_SortCommand" 
Visible="true" 
DataSourceID="dsBundleReport" 
OnDataBound="grdBundleReport_DataBound" 
> 
<PagerStyle NextPageText="Next" PrevPageText="Prev" Mode="NextPrevAndNumeric">  
</PagerStyle> 
<ExportSettings> 
<Excel Format="ExcelML" /> 
</ExportSettings> 
<ClientSettings  EnableRowHoverStyle="true" AllowColumnsReorder="true" AllowExpandCollapse="true" >                                               
<Resizing AllowColumnResize="true" ClipCellContentOnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="false" /> 
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="200px" /> 
</ClientSettings> 
<MasterTableView AllowPaging="true" AllowCustomSorting="true" AutoGenerateColumns="false"   
AlternatingItemStyle-CssClass="alernatingItemStyle" DataSourceID="dsBundleReport" UseAllDataFields="true">  
<Columns>                                                                 
<telerik:GridBoundColumn SortExpression="BenefitId" ItemStyle-Width="100"  HeaderStyle-Width="100" DataField="BenefitId" ReadOnly="true" HeaderText="Benefit Id" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Names="verdana" HeaderStyle-HorizontalAlign="Center" /> 
   <telerik:GridTemplateColumn     
   HeaderText="Image"     
   UniqueName="Image">    
   <ItemTemplate>    
   <asp:Image ID="Image1" runat="server" src="images/binoculars.gif"/>    
   </ItemTemplate>    
   </telerik:GridTemplateColumn>                                                                   
   <telerik:GridBoundColumn SortExpression="Id" ItemStyle-Width="100"  HeaderStyle-Width="100" DataField="Id" ReadOnly="true" HeaderText="Id" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Names="verdana" HeaderStyle-HorizontalAlign="Center" /> 
   <telerik:GridBoundColumn SortExpression="Cd" ItemStyle-Width="100"  HeaderStyle-Width="100" DataField="Cd" ReadOnly="true" HeaderText="Cd" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Names="verdana" HeaderStyle-HorizontalAlign="Center" /> 
   
                                                                
the first column doesnt come up .. any ideas why ? i want to redirect  on click.
Sabyasachi Dechaudhari
Top achievements
Rank 1
 answered on 26 Apr 2010
1 answer
122 views

I have a radgird that will be displaying support tickets. Within the grid I am using the telerik:GridImageColumn to display either a green, yellow or red image.

I am current trying to achieve this with  itemdatabound, using findcontrol. I keep getting an error “
Object reference not set to an instance of an object.”. Can some let me know what I am doing wrong?

Thanks


(

If

 

TypeOf e.Item Is GridDataItem Then

 

 

Dim dataItem As GridDataItem = DirectCast(e.Item, GridDataItem)

 

 

Dim dataBoundItem As GridDataItem = e.Item

 

 

Dim calcdate As Date

 

 

Dim tsTimeSpan As TimeSpan

 

 

Dim iNumberOfDays As Integer

 

calcdate = dataItem.DataItem(

"SubmitDate")

 

 

tsTimeSpan = Now.Subtract(calcdate)

iNumberOfDays = tsTimeSpan.Days

 

 

If iNumberOfDays < 2 Then

 

dataBoundItem.FindControl(

"imggreen").Visible = True

 

 

 

 

 

 

ElseIf iNumberOfDays = 2 Then

 

dataBoundItem.FindControl(

"imgyellow").Visible = True

 

dataItem(

"SubmitDate").BackColor = Color.Yellow

 

 

 

 

 

 

 

 

ElseIf iNumberOfDays >= 3 Then

 

dataBoundItem.FindControl(

"imgred").Visible = True

 

 

 

 

dataItem("SubmitDate").BackColor = Color.Red

 

 

End If

 

 

End If

 

)
Dwayne Starkey
Top achievements
Rank 1
 answered on 26 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?