Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
76 views
Hi,

I have upgraded my project to the new release today and discovered that the Pagebar has disappeared in some grids.
The grids that are affected are the ones there I'm using a webservice to deliver the correct amount of data to the grid, all other grid are unaffected.

Do you have any clue how to correct this?

Best Regards
Daniel Keereweer
Tobias
Top achievements
Rank 1
 answered on 11 Mar 2010
1 answer
79 views
Hi,

I need little guidance to help me choose a RadControl for the following:

I have a form on a webpage which has an update button. After the form is updated, the user clicks on the update button and a message should display in a box stating that the form is now updated. This box should either have a cross on the top to close the box or a close button which can be clicked on and then the message box disappears. This message box should show on the page itself and not as a pop up alert or window.

Which RadControl should I use for creating this message box.

Any help / suggestion on this is highly appreciated.

Many Thanks,
Ritika
Dimo
Telerik team
 answered on 11 Mar 2010
1 answer
161 views
Hi,

I have problems with radTabScript , radMultiPage and Controls created for each tab

CONTEXT:

I have a "container" page called "Solutions.aspx" in which I need to add tabs (controls) with RadTabStrip and RadMultiPage.

Solutions.aspx

<tr> 
                    <td colspan="2">  
                        <div> 
                            <telerik:RadTabStrip ID="RadTabStripSolution" SelectedIndex="0" runat="server" MultiPageID="RadMultiPageSolution" 
                                Skin="WebBlue" OnTabClick="RadTabStripSolution_TabClick">  
                            </telerik:RadTabStrip> 
                            <telerik:RadMultiPage ID="RadMultiPageSolution" runat="server" SelectedIndex="0" 
                                OnPageViewCreated="RadMultiPageSolution_PageViewCreated" BorderWidth="1">  
                            </telerik:RadMultiPage> 
                        </div> 
                    </td> 
                </tr> 

Solutions.aspx.cs

protected void Page_Load(object sender, EventArgs e)  
        {  
            //Get variables   
            loggedUser = (UserDTO)HttpContext.Current.Session["user"];  
 
            if (Request.QueryString["RetirementID"] != null)  
                randaID = int.Parse(Request.QueryString["RetirementID"]);  
 
            if (!Page.IsPostBack)  
            {  
                RetirementDTO retirement = new RetirementController().GetRetirementAllTabs(randaID);  
                  
                WorkflowDTO wfRetirement = new WorkflowActions().ShowTabsLoad(loggedUser, retirement);  
                if (wfRetirement != null)  
                {  
                    int count = 0;  
                    foreach (WorkflowTabDTO wfTab in wfRetirement.Tabs)  
                    {  
                        AddTab(wfTab);  
                        if (wfTab.Selected)  
                        {  
                            RadTab tab = new RadTab(wfTab.TabName, wfTab.TabId.ToString());  
                            if(count <=0)  
                            AddPageView(tab);  
                        }  
                        count++;  
                    }  
                }  
 
                if (wfRetirement.Retirement != null)  
                {  
                    // Retirement is locked  
                    if (wfRetirement.Retirement.Edited)  
                    {  
 
                        //Add session "edit" -> true, edit mode  
                        if (HttpContext.Current.Session["edit"] != null  
                            && !HttpContext.Current.Session["edit"].ToString().Equals(string.Empty))  
                        {  
                            HttpContext.Current.Session.Remove("edit");  
                        }  
                        HttpContext.Current.Session.Add("edit", true);  
 
                    }  
                    else  
                    {  
                        //Alert  
                        this.AlertEditPermission.Text = GetGlobalResourceObject("RANDAGlobalResource", "readPermissionAlert").ToString();  
                        this.PlaceHolderAlertEdit.Visible = true;  
                        //Add session "edit" -> false, view mode  
                        HttpContext.Current.Session.Add("edit", false);  
                    }  
                      
            }  
        }  
 
 
protected void RadMultiPageSolution_PageViewCreated(object sender, RadMultiPageEventArgs e)  
        {  
            string userControlName = "../controls/" + e.PageView.ID + ".ascx";  
 
            //Control userControl = Page.FindControl(userControlName);  
            Control userControl = Page.LoadControl(userControlName);  
            //if (userControl == null)  
            //    userControl = Page.LoadControl(userControlName);  
              
 
            userControl.ID = e.PageView.ID + "_userControl";  
              
            if (e.PageView.FindControl(userControl.ID) == null)  
            {  
                e.PageView.Controls.Add(userControl);  
            }  
 
        } 

 

protected void RadTabStripSolution_TabClick(object sender, RadTabStripEventArgs e)  
        {  
            if (this.RadMultiPageSolution.FindPageViewByID(e.Tab.Text) == null)  
                AddPageView(e.Tab);  
            e.Tab.PageView.Selected = true;  
        } 
private void AddTab(WorkflowTabDTO tabWf)  
        {  
            RadTab tab = new RadTab(tabWf.TabName, tabWf.TabId.ToString());  
            tab.Enabled = tabWf.Enable;  
            tab.Selected = tabWf.Selected;  
            RadTabStripSolution.Tabs.Add(tab);              
        }  
 
        private void AddPageView(RadTab tab)  
        {  
            RadPageView pageViewCustom = new RadPageView();  
            pageViewCustom.ID = tab.Text;  
            if (this.RadMultiPageSolution.FindPageViewByID(tab.Text) == null)  
            //if (this.RadMultiPageSolution.FindControl(pageViewCustom.ID) == null)  
            {  
                this.RadMultiPageSolution.PageViews.Add(pageViewCustom);  
            }  
            else 
            {  
                this.RadMultiPageSolution.PageViews.Remove(pageViewCustom);  
                this.RadMultiPageSolution.PageViews.Add(pageViewCustom);  
            }  
            //pageViewCustom.Enabled = tabWf.Enable;  
            tab.PageViewID = pageViewCustom.ID;  
            pageViewCustom.Selected = true; 


Controls:
 - Register.ascx
 - Research.ascx
 - Agreement.ascx
 - PeriodicReview.ascx
 - Completion.ascx
 - Administration.ascx

Example of Register.ascx:

protected void nextButton_Click(object sender, EventArgs e)  
        {  
 
            RetirementDTO ret = new RetirementController().GetRetirementAllTabs(randaId);  
              
            //Get the next Tab and give it the control  
            WorkflowTabDTO wfTab = new WorkflowActions().NextTab(ret, (int)TabEnum.REGISTER);  
            if (edit)  
            {  
                if (SaveData())  
                {  
                    UpdateLastTabModified((int)TabEnum.REGISTER);  
                    GoToNextTab(wfTab);  
                    GoToNextPageView(wfTab);  
                      
                }  
            }  
            else 
            {  
                GoToNextTab(wfTab);  
                GoToNextPageView(wfTab);  
            }  
              
        } 

 

private void GoToNextTab(WorkflowTabDTO tab)  
        {  
            //Enable and select the next tab  
            RadTabStrip tabStrip = (RadTabStrip)Page.Master.FindControl("ContentPlaceHolder").FindControl("RadTabStripSolution");  
 
            RadTab nextTab = tabStrip.FindTabByText(tab.TabName);  
            nextTab.Enabled = tab.Enable;  
            nextTab.Selected = tab.Selected;  
 
        }  
 
        /// <summary>  
        /// Go to next page  
        /// </summary>  
        private void GoToNextPageView(WorkflowTabDTO tab)  
        {  
            //Go to next page  
            RadMultiPage multiPage = (RadMultiPage)Page.Master.FindControl("ContentPlaceHolder").FindControl("RadMultiPageSolution");  
            RadPageView nextPageView = multiPage.FindPageViewByID(tab.TabName);  
 
            if (nextPageView == null)  
            {  
                nextPageView = new RadPageView();  
                nextPageView.ID = tab.TabName;  
                multiPage.PageViews.Add(nextPageView);  
            }  
 
            nextPageView.Selected = true;  
      } 


First at all, I add all tabs (enable or not according to bussiness rule) and I select one of them as (tab.Selected = true).
When tabs are enable, I can click on all of them and see them

I can move between tabs in two ways:
  1º) Clicking into the Tab
  2º) Press the "SAVE&NEXT" button
  
To set enable next tab and display it, I need to press "Save&Next" button and I need to Add into pageView the new Tab and load it.

Attached: code files and screenshot of example.

ISSUE/PROBLEM:

When I try to pass from one tab (for example: RegisterTAB) to next tab (for example: ResearchTAB) on clicking on the Tab:
  - I can't load data into new selected TAB
  
When I press "Save&Next" Button:
  - Next tab is not selected and data isn't loaded.
  
  
SUMMARY:

- New Tab is not selected
- Data is not loaded
- I can't see Radalert launch from Controls
- When tab is changed, RadDecorator doesn't work (example: Buttons)

See attached file.

Please, I need to resolve these issues as soon as possible.

Thanks in advance.

Lorena

Yana
Telerik team
 answered on 11 Mar 2010
3 answers
193 views
Hi,
I am using the RAD grid column filter with custom skins ,am facing the problem with the filter menu skins.
I have the sample of view of the filter.Please help me out.
Dimo
Telerik team
 answered on 11 Mar 2010
3 answers
205 views
I have a RadScheduler with a SelectedDate of 1/1/2010.  I am using the timeline view with a SlotDuration = 2 and NumberofSlots = 183.  I have a date that spans over 2 years, and yet is only displayed as a 6 month appointment.  I also have another appointment that is supposed to be around 10 months long as is displaying as an appointment around 5-6 months.    Please view attached screen shot to see my issue.  I set the appointment subject texts to the start and end date of the appointments.

Any advice will be helpful.  Below is my HTML for the RadScheduler.



<%@ Page Title="" Language="VB" MasterPageFile="~/NewStims/mpStims.master" AutoEventWireup="false" 
  CodeFile="BigCalendar.aspx.vb" Inherits="NewStims_Events_BigCalendar" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> 
  <link href="Scheduler.Seths.css" rel="stylesheet" type="text/css" /> 
 
 
  <telerik:RadScheduler ID="scEvents" runat="server" Width="900px" Skin="Seths" 
    SelectedView="TimelineView" EnableEmbeddedSkins="False" CustomAttributeNames="EventStartDate, EventEndDate" 
    EnableCustomAttributeEditing="true" DataKeyField="EventID" DataSubjectField="EventTitle" 
    DataStartField="EventStartDate" FirstDayOfWeek="Monday" CssClass="slotClass" ShowDateHeaders="true" ShowHeader="true" 
     ShowNavigationPane="true" ShowViewTabs="true" LastDayOfWeek="Friday" DataEndField="EventEndDAte" OverflowBehavior="Expand" 
    ShowFooter="false" BackColor="Transparent" > 
    <TimelineView SlotDuration="2" NumberOfSlots="183"   /> 
    <AppointmentTemplate> 
    <div class="divWrap"> 
    <%#CType(Eval("EventStartDate"), Date).Day.ToString()%> 
    </div> 
      <div style="width:70%;float:left"> 
      <%#Eval("Subject")%> 
      </div> 
      <div class="divWrap"> 
      <%#CType(Eval("EventEndDate"), Date).Day.ToString()%> 
      </div> 
    </AppointmentTemplate> 
  </telerik:RadScheduler> 
 


T. Tsonev
Telerik team
 answered on 11 Mar 2010
3 answers
151 views
I am using a grid with grouping and have set the default image path to /Skins/Office2007/Grid.  All of the images show up except the ones for the grouping in the header SortAsc.gif and SortDesc.gif.  How do I set the image paths for these?

<telerik:RadGrid ID="RadGrid1" runat="server" 
                            AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"   
                            AutoGenerateColumns="False"   
                            DataSourceID="SqlDataSourceInbox" GridLines="None"   
                Height="360px" onitemcommand="RadGrid1_ItemCommand"   
                            onitemdatabound="RadGrid1_ItemDataBound"   
                            onselectedindexchanged="RadGrid1_SelectedIndexChanged" ShowGroupPanel="True"   
                            Skin="Office2007" Width="725px"   
                ondeletecommand="RadGrid1_DeleteCommand" ImagesPath="/Skins/Office2007/Grid">  
        <PagerStyle Mode="NextPrevAndNumeric" FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif"   
                                LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif"   
                                NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif"   
                                PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /><mastertableview allowmulticolumnsorting="True"   
                            datasourceid="SqlDataSourceInbox" tablelayout="Fixed" width="724px">                             
                                <CommandItemSettings AddNewRecordImageUrl="/Skins/Office2007/Grid\AddRecord.gif"   
                                    ExportToCsvImageUrl="/Skins/Office2007/Grid\ExportToCsv.gif"   
                                    ExportToExcelImageUrl="/Skins/Office2007/Grid\ExportToExcel.gif"   
                                    ExportToPdfImageUrl="/Skins/Office2007/Grid\ExportToPdf.gif"   
                                    ExportToWordImageUrl="/Skins/Office2007/Grid\ExportToWord.gif"   
                                    RefreshImageUrl="/Skins/Office2007/Grid\Refresh.gif" /> 
                                <RowIndicatorColumn FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                    SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                    SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif">  
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn CollapseImageUrl="/Skins/Office2007/Grid\SingleMinus.gif"   
                                    ExpandImageUrl="/Skins/Office2007/Grid\SinglePlus.gif"   
                                    FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                    SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                    SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif">  
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridClientSelectColumn Reorderable="False"   
                                        UniqueName="ClientSelectColumn">  
                                        <HeaderStyle Width="20px" /> 
                                    </telerik:GridClientSelectColumn> 
                                    <telerik:GridTemplateColumn Groupable="False" UniqueName="TemplateColumn1">  
                                        <HeaderStyle Width="20px" /> 
                                        <ItemStyle Height="35px" HorizontalAlign="Center" /> 
                                        <ItemTemplate> 
                                            <img alt="MailIcon" src="images/MailIcon.gif"   
                                                style="margin-bottom: 10px; margin-left: 2px" /> 
                                        </ItemTemplate>                           
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn GroupByExpression="SentBy"   
                                        HeaderText="From / Subject" SortExpression="SentBy"   
                                        UniqueName="TemplateColumn2">  
                                        <HeaderStyle Width="150px" /> 
                                        <ItemStyle Height="30px" Width="150px" /> 
                                        <ItemTemplate> 
                                            <%# DataBinder.Eval(Container.DataItem, "SentBy") %> 
                                            <br /> 
                                            <div class="MailSubject">  
                                                <%# DataBinder.Eval(Container.DataItem, "Subject") %> 
                                            </div> 
                                        </ItemTemplate>                                      
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridBoundColumn DataField="ReceivedShort" DataFormatString="{0:d}"   
                                        HeaderText="Received" SortExpression="Received" UniqueName="ReceivedShort">  
                                        <HeaderStyle Width="40px" /> 
                                        <ItemStyle Width="40px" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentName" HeaderText="AttachmentName"   
                                        SortExpression="AttachmentName" UniqueName="AttachmentName">  
                                        <HeaderStyle Width="60px" /> 
                                        <ItemStyle Width="60px" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Message" DefaultInsertValue=""   
                                        HeaderText="Message" UniqueName="Message" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentPath" DefaultInsertValue=""   
                                        HeaderText="AttachmentPath" SortExpression="AttachmentPath"   
                                        UniqueName="AttachmentPath" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentType" DefaultInsertValue=""   
                                        HeaderText="AttachmentType" SortExpression="AttachmentType"   
                                        UniqueName="AttachmentType" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="AttachmentSize" DefaultInsertValue=""   
                                        GroupByExpression="AttachmentSize" HeaderText="AttachmentSize"   
                                        UniqueName="AttachmentSize" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="SentBy" DefaultInsertValue=""   
                                        HeaderText="SentBy" SortExpression="SentBy" UniqueName="SentBy" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Subject" DefaultInsertValue=""   
                                        HeaderText="Subject" SortExpression="Subject" UniqueName="Subject"   
                                        Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="SentTo" DefaultInsertValue=""   
                                        HeaderText="SentTo" SortExpression="SentTo" UniqueName="SentTo" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Received" DefaultInsertValue=""   
                                        HeaderText="Received" SortExpression="Received" UniqueName="Received"   
                                        Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="LastRead" DefaultInsertValue=""   
                                        EmptyDataText="" HeaderText="LastRead" SortExpression="LastRead"   
                                        UniqueName="LastRead" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"   
                                        ConfirmText="Are you sure you want to delete this email?"   
                                        HeaderStyle-Width="35px" ImageUrl="/Skins/Office2007/Grid/Delete.gif"   
                                        Text="Delete" UniqueName="DeleteColumn">  
                                        <HeaderStyle Width="35px" /> 
                                    </telerik:GridButtonColumn> 
                                </Columns>                 
                                <groupbyexpressions> 
                <telerik:GridGroupByExpression> 
                    <selectfields> 
                        <telerik:GridGroupByField FieldAlias="ReceivedShort" FieldName="ReceivedShort"   
                            FormatString="{0:d}" HeaderText="Received"   
                            HeaderValueSeparator=" from date: " /></selectfields>  
                    <groupbyfields> 
                        <telerik:GridGroupByField FieldName="ReceivedShort" FormatString=""   
                            HeaderText="Received" SortOrder="Descending"  /></groupbyfields></telerik:GridGroupByExpression></groupbyexpressions>              
                                <EditFormSettings> 
                                    <EditColumn CancelImageUrl="/Skins/Office2007/Grid\Cancel.gif"   
                                        EditImageUrl="/Skins/Office2007/Grid\Edit.gif"   
                                        FilterImageUrl="/Skins/Office2007/Grid\Filter.gif"   
                                        InsertImageUrl="/Skins/Office2007/Grid\Update.gif"   
                                        SortAscImageUrl="/Skins/Office2007/Grid\SortAsc.gif"   
                                        SortDescImageUrl="/Skins/Office2007/Grid\SortDesc.gif"   
                                        UpdateImageUrl="/Skins/Office2007/Grid\Update.gif">  
                                    </EditColumn> 
                                </EditFormSettings> 
                                <PagerStyle FirstPageImageUrl="/Skins/Office2007/Grid\PagingFirst.gif"   
                                    LastPageImageUrl="/Skins/Office2007/Grid\PagingLast.gif"   
                                    NextPageImageUrl="/Skins/Office2007/Grid\PagingNext.gif"   
                                    PrevPageImageUrl="/Skins/Office2007/Grid\PagingPrev.gif" /> 
            </mastertableview> 
                            <groupingsettings showungroupbutton="True"  /> 
                            <GroupPanel CssClass="RadGrid_Office2007">  
                              
                            </GroupPanel> 
                            <clientsettings allowdragtogroup="True"  enablepostbackonrowclick="true"><selecting   
                            allowrowselect="True" /><scrolling allowscroll="True" scrollheight="275px"    
                            usestaticheaders="True" /> 
            <clientmessages dragtogrouporreorder="Drag to group" /></clientsettings></telerik:RadGrid> 
Dimo
Telerik team
 answered on 11 Mar 2010
1 answer
93 views
Hello,


I have a combobox that has a tree view nested inside. So far so good. I have a prerender event that I was planning on using to populate the tree from a dataset.

#1. First problem...For some reason the event fires 3 times resulting in the node list being created 3 times. I thought it might have to do with having 3 levels of nodes but going back to one still presents the same problem. As I understand the ASP page cycle this shouldn't be happening?

#2. Second problem is more of a question. How do I bind the data to the nodes? I have a table with say three columns State, City, School. At the top node I want State, Below The State I want all corresponding Cities, Below the Cities schools. Now I know how to generate a SQL query to get this data so lets call that done. How then shall I bind it? To each node individually? If so do I have to "loop" through putting the row into a DataRow object and then binding to each nodes DataItem?

#3. The cherry on top. Once a school has been selected I need to display that selection in the combobox and populate the comboboxes value field with the school ID. Can this be done client side or will I have to post back to update the combobox and what about the school id? Where should I hide that data while I'm waiting for them to pick a school...in a hidden (visible=false) tree view under the school?

Thanks
JB

Veronica
Telerik team
 answered on 11 Mar 2010
1 answer
83 views
Hi,

We're building a chat application wherein we need to open and dock a user control which accepts parameters (such as session ID) within a javascript and web methods (this is supposedly a chat window, but the docking functionality is not supported in RadWindow, so we're thinking of docking a user control instead. But if there could be an update that the window can be docked, much better.) for every click of a "chat buddy". Is there any way we could do that? I've been looking for solutions to this problem for the past week and it seems that this issue has not yet been addressed.

An immediate reply is greatly appreciated. :)

Thanks.
Pero
Telerik team
 answered on 11 Mar 2010
1 answer
123 views
Hi,

We're building a chat application wherein we need to open and dock a user control which accepts parameters (such as session ID) within a javascript and web methods (this is supposedly a chat window, but the docking functionality is not supported in RadWindow, so we're thinking of docking a user control instead. But if there could be an update that the window can be docked, much better.) for every click of a "chat buddy". Is there any way we could do that? I've been looking for solutions to this problem for the past week and it seems that this issue has not yet been addressed.

An immediate reply is greatly appreciated. :)

Thanks,

Lisette
Pero
Telerik team
 answered on 11 Mar 2010
1 answer
301 views

Hi every one,

 

I am using telerik:GridButtonColumn it's working on Mozila firefox but does not work on chrome, when I click on gridbuttoncolumn it throws an error mention below:


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

 

aspx code:

 

<telerik:RadFormDecorator ID="blueMapsFormDecorator" runat="server" DecoratedControls="all"

                Skin="Web20"></telerik:RadFormDecorator>

           

            <telerik:RadGrid AutoGenerateColumns="False" ID="gdListAccountDeactivate" AllowFilteringByColumn="true"

                Width="100%" AllowPaging="True" AllowSorting="True" AllowRowSelect="true" runat="server"

                OnItemCommand="gdListAccountDeactivate_ItemCommand">

                <ClientSettings>

                    <Selecting AllowRowSelect="True" />     

                </ClientSettings>

                <PagerStyle Mode="NextPrevAndNumeric" />

                <GroupingSettings CaseSensitive="false" />

                <MasterTableView TableLayout="Fixed">

                    <Columns>

                       <telerik:GridBoundColumn HeaderText="EmailID" DataField="emailID" ItemStyle-Width="200px"

                        SortExpression="emailID" HeaderStyle-Width="200px" FilterControlWidth="180px"

                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />

                                                

                       <telerik:GridButtonColumn ConfirmText="Deactivate this User?" ConfirmDialogType="RadWindow" HeaderStyle-HorizontalAlign="Center"

                        ConfirmTitle="Deactivate" ButtonType="ImageButton" ImageUrl="~/images/delete.gif" CommandName="Deactivate" Text="Deactivate"

                        UniqueName="DeleteColumn" HeaderText="Deactivate" ItemStyle-Width="50px" HeaderStyle-Width="50px">

                        <itemstyle horizontalalign="Center" cssclass="MyImageButton" />

                        </telerik:GridButtonColumn>

                    

                     <telerik:GridTemplateColumn UniqueName="appuserid" AllowFiltering="false" AutoPostBackOnFilter="false" ItemStyle-Width="50px" HeaderStyle-Width="50px" >

                        <ItemTemplate>

                            <telerik:RadTextBox Visible="false" ID="appUser" runat="server" Text='<%# Bind("appuserid") %>'>

                            </telerik:RadTextBox>

                            <asp:LinkButton ID="LinkButton2" Width="50px" CommandName="Redirect"

                                Text="Portfolio" runat="server"></asp:LinkButton>

                        </ItemTemplate>

                    </telerik:GridTemplateColumn>  

                       

                    </Columns>

                </MasterTableView>

            </telerik:RadGrid><br />

            <telerik:RadWindowManager ID="RadWindowManager2" runat="server"></telerik:RadWindowManager>

 

aspx.cs code:

 

protected void gdListAccountDeactivate_ItemCommand(object source, GridCommandEventArgs e)

    {

        if (e.CommandName == "Redirect")

        {

            GridDataItem item = (GridDataItem)e.Item;

            string ID = (item.FindControl("appUser") as RadTextBox).Text;

            string url = "Portfolio.aspx?ID=" + Security.QueryStringEncode(ID);

            Response.Redirect(url);

        }

        if (e.CommandName == "Deactivate")

        {

            GridDataItem item = (GridDataItem)e.Item;

            string appID = (item.FindControl("appUser") as RadTextBox).Text;

            int appuserid = Convert.ToInt32(appID);

            int lastupdatedby = Convert.ToInt32(Session["appuserid"]);

            Member objMember = new Member();

            objMember.DeactivateAccount(appuserid, lastupdatedby);

            BindGrid();

        }

    }

public void BindGrid()

    {

        int ImplementationID = 0;

        if (Session["ImplementationID"] == "")

        {

            ImplementationID = 0;

            ds = objAccount.FetchUser("Account Manager", ImplementationID);

        }

 

        if (ds.Tables[0].Rows.Count > 0)

        {

            gdListAccountDeactivate.DataSource = ds.Tables[0];

            gdListAccountDeactivate.DataBind();

        }

    }

Thanks

Tsvetoslav
Telerik team
 answered on 11 Mar 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?