Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
254 views
Hi,

I am using the rad editor and i need the use the docuement manager in the editor.
I want to path like this one \\Telerik.com\Path\SharedDir\ROOT\Folder_1\

If run my share drive trought run in windows i have acces not problem.

When i use it in the editor and click on the document manager there nothing showing!

What i am missing?

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
       Dim viewPaths As String() = New String() {"C:\PhysicalSource\ROOT", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim uploadPaths As String() = New String() {"C:\PhysicalSource\ROOT\CanUpload", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim deletePaths As String() = New String() {"C:\PhysicalSource\ROOT\Folder_1\CanDelete", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
    End Sub

In asp

<telerik:RadEditor ID="RadEditor1" runat="server">
</telerik:RadEditor>

Dobromir
Telerik team
 answered on 21 Nov 2011
3 answers
115 views
Hello all,

I am able to unrate other stars by clicking on already rated star now what  I need is to unrate the first star by clicking on it again

Thanks,
aRviN
Niko
Telerik team
 answered on 21 Nov 2011
4 answers
168 views
Hi,

i am using this code for update grid row text but it is not working

HTML CODE
/////
 <div id="divListGrid" class="floatLeft" style="width: 30%">
        <cc1:PGrid runat="server" ID="datalist" AllowPaging="true" AllowSorting="true" PageSize="25">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="SearchHeader, CreatedDateTime"
                TableLayout="Fixed" ClientDataKeyNames="SearchHeader, CreatedDateTime,HeaderID"
                EditMode="EditForms">
                <Columns>
                    <cc1:PGridBoundColumn DataField="SearchHeader" HeaderText="<%$ Resources:demo,LABEL_SEARCH_HEADER  %>"
                        SortExpression="SearchHeader" UniqueName="SearchHeader" ColumnEditorID="GridTextBoxColumnEditor1">
                        <HeaderStyle Width="30%" />
                        <ItemStyle Wrap="true" />
                    </cc1:PGridBoundColumn>
                    <cc1:PGridBoundColumn DataField="CreatedDateTime" HeaderText=""
                        SortExpression="CreatedDateTime" ReadOnly="true" UniqueName="CreatedDateTime"
                        DataFormatString="{0:dd-MMM-yyyy}">
                        <HeaderStyle Width="20%" />
                        <ItemStyle Wrap="true" />
                    </cc1:PGridBoundColumn>
                    <telerik:GridEditCommandColumn EditText="<%$ Resources:demo,LABEL_EDIT %>" ItemStyle-CssClass="demo_Secondary_Button" >
                        <HeaderStyle Width="11%" Wrap="true"/>
                    </telerik:GridEditCommandColumn>
                       <cc1:PGridTemplateColumn>
                        <ItemTemplate>
                          <cc1:PImageButton Text="<%$ Resources:demo,LABEL_DELETE %>" ID="cmdDelete" Visible="true" CommandArgument="Delete"
                                 runat ="server" OnClientClick="javascript:removeHeader(); return false;"  ImageUrl="~/Images/transparent.png"
                                  CssClass="ui-icon ui-icon-trashdemoImage floatLeft" ToolTip="<%$ Resources:demo,LABEL_DELETE %>"  />

                        </ItemTemplate>
                        <HeaderStyle Width="11%" />
                    </cc1:PGridTemplateColumn>
                </Columns>
                <EditFormSettings EditColumn-ItemStyle-CssClass ="demo_Secondary_Button">
                    <EditColumn UpdateText="<%$ Resources:demo,LABEL_UPDATE %>" UniqueName="EditCommandSearchHeader"
                        CancelText="<%$ Resources:demo,LABEL_CANCEL %>">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowSelected="RowSelected" OnRowMouseOver="RowMouseOver" />
            </ClientSettings>
        </cc1:PGrid>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="100px" />
    </div>
</div>

//javascript

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">

        var hasChanges, inputs, editedRow, currentRowIndex, gridSearchResultCurrentRowIndex;
        function loadItems() {
            if (currentRowIndex > -1) {
                var masterTableView = $find("<%= datalist.ClientID %>").get_masterTableView();
                var dataItem = masterTableView.get_dataItems()[currentRowIndex];
                masterTableView.clearSelectedItems();
                dataItem.set_selected(true);
            }
        }
        function RowDblClick(sender, eventArgs) {
            editedRow = eventArgs.get_itemIndexHierarchical();
            $find("<%= datalist.ClientID %>").get_masterTableView().editItem(editedRow);
        }

        function RowMouseOver(sender, eventArgs) {
            currentRowIndex = eventArgs.get_itemIndexHierarchical();
        }

        //        function RowCommand(sender, eventArgs) {
        //            debugger;
        //            if (currentRowIndex > -1) {
        //                if (eventArgs.get_commandName() == "Edit") {
        //                    $find("<%= datalist.ClientID %>").get_masterTableView().editItem(currentRowIndex);
        //                }
        //            }

        //        }

        function RowSelected(sender, eventArgs) {

            var headerID = eventArgs.getDataKeyValue("HeaderID");
            var panel = $find("<%= XmlHttpPanelSaveHistory.ClientID %>");
            panel.set_value(headerID);

        }

        function RowClick(sender, eventArgs) {

            if (hasChanges && editedRow) {
                hasChanges = false;

                if (confirm("Update changes?")) {

                    $find("<%= datalist.ClientID %>").get_masterTableView().updateItem(0);
                }
            }
        }




        function GridCreated(sender, eventArgs) {

            var gridElement = sender.get_element();
            var elementsToUse = [];
            inputs = gridElement.getElementsByTagName("input");
            for (var i = 0; i < inputs.length; i++) {
                var lowerType = inputs[i].type.toLowerCase();
                if (lowerType == "hidden" || lowerType == "button") {
                    continue;
                }

                Array.add(elementsToUse, inputs[i]);
                inputs[i].onchange = TrackChanges;
            }

            setTimeout(function () { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100);
        }

        function TrackChanges(e) {
            hasChanges = true;
        }


        function removeHeader(rowIndex) {
            rowIndex = currentRowIndex;
            if (rowIndex > -1 && jsConfirm('<%= Resources.demo.MSG_DELETE %>')) {
                var item = $find("<%= datalist.ClientID %>").get_masterTableView().get_dataItems()[rowIndex];
                var headerID = item.getDataKeyValue("HeaderID");
                var userID = "<%= Session.User.ID %>"
                patseer.web.webservices.SearchHistoryService.RemoveSearchHeader(userID, headerID, removeSearchHeader_OnSuccessCallback, removeSearchHeader_OnErrorCallback, item);
            }

        }

        function removeSearchHeader_OnSuccessCallback(result, dataItem) {
            if (result == true) {
                ShowMessage('<%= Resources.demo.MSG_SUCCESSFULLY %>');
                var masterTable = $find("<%= datalist.ClientID %>").get_masterTableView().get_element();
                $(dataItem.get_element()).remove();
                currentRowIndex = -1;
            }
            else {
               
            }
        }

        function gridSearchResult_RowMouseOver(sender, eventArgs) {
            gridSearchResultCurrentRowIndex = eventArgs.get_itemIndexHierarchical();
        }

        function removeSearchTermFromHeader() {
            var rowIndex = gridSearchResultCurrentRowIndex;
            if (rowIndex > -1 && jsConfirm('<%=  Resources.demo.MSG_DELETE %>')) {
                var item = $find("<%= gridSearchResult.ClientID %>").get_masterTableView().get_dataItems()[rowIndex];
                var searchTermID = item.getDataKeyValue("SearchTermID");
                patseer.web.webservices.SearchHistoryService.RemoveSearchTermFromHeader(searchTermID,
                        removeSearchTermFromHeader_OnSuccessCallback, removeSearchTermFromHeader_OnErrorCallback, item);
            }

        }

        function removeSearchTermFromHeader_OnSuccessCallback(result, dataItem) {
            if (result == true) {
                ShowMessage('<%= Resources.demo.MSG_SEARCH_SUCCESSFULLY %>');
                var grid = $find("<%= gridSearchResult.ClientID %>");
                var masterTable = grid.get_masterTableView().get_element();
                $(dataItem.get_element()).remove();
                gridSearchResultCurrentRowIndex = -1;
            }
            else {
                ShowErrorMessage('<%= Resources.demo.MSG_SEARCH_FAILED %>');
            }
        }

        function removeSearchTermFromHeader_OnErrorCallback(result) {
            ShowErrorMessage('<%= Resources.demo.MSG_FAILED %>');
        }

    </script>
</telerik:RadCodeBlock>


.cs file code block

page_load
 datalist.NeedDataSource += new GridNeedDataSourceEventHandler(datalist_NeedDataSource);
            datalist.UpdateCommand += new GridCommandEventHandler(datalist_UpdateCommand);

void datalist_UpdateCommand(object source, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            GridEditManager editMan = editedItem.EditManager;
            string editorText = ((e.Item as GridEditableItem)["SearchHeader"].Controls[0] as TextBox).Text;
            string headerID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["HeaderID"].ToString();
            if (!string.IsNullOrWhiteSpace(editorText))
            {
              // insert into database
                if (result != default(int))
                {
                   
                    return;
                }
            }
          
            e.Canceled = true;
        }
Ravi
Top achievements
Rank 1
 answered on 21 Nov 2011
1 answer
82 views
I'm doing a findControl to find a control inside a grid line.  I have multiple controls (Qty_fin and ReservedQty_fin).  If I do a findControl on Qty_fin, I might get the ReservedQty_fin control.  I worked around this by changing the id for Qty_fin, but wanted to pass this along.
Veli
Telerik team
 answered on 21 Nov 2011
6 answers
296 views
Hi there,

I've inherited a project that makes use of various Telerik controls throughout, but none moreso than RadGrids. For the most part the grids are declared and defined in the ASPX files and all their formatting set there, however what I want to do is move away from that and instead set them up in the code behind. I've spent the last hour looking through your site and the various pages, however nothing adequately provides answers to what I'm trying to do.

I call a stored procedure from a database and store the result in the dataset. The dataset therefore contains all the information I need and I can easily dump this out in to an ASP GridView control and manipulate it however I want. The rest of the project however is using the RadGrids, so I'm trying to do the very same thing with a RadGrid. To do this I did the following:

rgdTable.DataSource = myDataSet.Tables("myTable")
rgdTable.DataBind()

The problems I have began when I found the dataset I get back from the database had two columns in it that I didn't want to display. I assumed it would be as simple as setting the .Visible property on the two columns to false so the Grid wouldn't display them, however every attempt I've made to find exactly WHERE these columns are bound has resulted in errors. I've tried rgdTable.Columns and rgdTable.MasterTableView.Columns, along with looking in the DetailTables, and they always return a count of 0. If the columns ARE being bound and ARE being displayed, why is it that I can't access them programmatically?

DisplayInfo.InnerHtml = "<p>Master Table Column Count: " & rgdTable.MasterTableView.Columns.Count & "</p>"
DisplayInfo.InnerHtml = "<p>RadGrid Column Count: " & rgdTable.Columns.Count & "</p>"

Both of these (run individually, not together obviously) return a column count of 0. So where ARE these columns being bound to exactly? I need to be able to access them once they're bound to the grid to be able to change them as I see fit.

Any help you could provide would be appreciated.
Veli
Telerik team
 answered on 21 Nov 2011
5 answers
176 views
Hi Telerik,

I am trying to implemented an 'Edit Mode' for my application. When exiting out of 'Edit Mode' the user has two options -- revert to old state, or save changes.

I noticed that when the option 'revert state' is chosen, even though I clear all my saved information, the RadPanes still retain their old dimensions. I know this is by design, and that's fine, but I would like to clear that memory from within a static method.

Basically, if the user refreshes the page -- everything is good. The ClientState information is lost, old data is loaded from our database, and the dimensions for the controls are set. But, when ClientState information is not lost, the old data is overwritten with the client state data.

If it's not possible to do within a static method, let me know the instructions anyway. I can probably re-implement the lost functionality in a way that would work for my project.

Thanks

Sean
Dobromir
Telerik team
 answered on 21 Nov 2011
6 answers
264 views
Hi

Do we have any component that would help to build a static image from code.
eg. like a computer network diagram with connecting points.

We will have a parent child relationship of nodes in a database,
and from that we would like to buid a diagram and present it on web as a image.

Alternative suggestions are welcome.

Regards
JD
Mick
Top achievements
Rank 1
 answered on 21 Nov 2011
2 answers
271 views
Hi,
I am getting this error when i deployed my application on testing server on IIS 7.0. But it works fine in my dev environment. I have made all the config entries. Here is the complete error message.

Global Handler: System.Web

Page: /Claims/Telerik.RadUploadProgressHandler.ashx

The file '/Claims/Telerik.RadUploadProgressHandler.ashx' does not exist.

at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously


Thanks
Bozhidar
Telerik team
 answered on 21 Nov 2011
1 answer
70 views
Hi,

We have customers reporting issues that the RadCombo box not working at all in IE 9 browser. When we debugged the issue we found that the ItemRequested event is not firing at all. The version that we currently use is Telerik.Web.UI, Version=2010.1.415.20, Culture=neutral, PublicKeyToken=121FAE78165BA3D4. 

I have seen in the forums that this is a known issue with older version and so please let us know if upgrading to newer version will fix it. We would like to evaluate the cost involved in upgrading to a newer version.

Kalina
Telerik team
 answered on 21 Nov 2011
1 answer
141 views

Dear Telerik Team,

I am trying to add a grid dynamically within a panelbar.The panel bar is created at design time.
I am getting the below issue  :

Radpanelbar is contained inside a div and grid is inside the panelbar. When the Panelbar item is clicked, then grid is generated and populated by the dataset.The problem is that the header of the grid is scrollable alongwith the panelbar but the grid rows do not get scrolled and remain static.

Please suggest a resolution it is very urgent.There seem to be lot of issues with Radgrid when it is used inside a panelbar by generating dynamically.

Here is the code  :

ASPX:

 

 

 

<div id="divChangeImpact" style="width:100%;height:100;overflow:auto">

 

 

 

<rad:RadAjaxPanel ID="ajPanelImpact" runat="server" ScrollBars="None" Width="100%" Height="100" LoadingPanelID="AjaxLoadingPanelAccount">

 

 

 

 

 

 

 

 

<rad:RadPanelbar ID="panelChangeImpact" runat="server" Width="100%"

 

 

 

Height="100px" ExpandMode="SingleExpandedItem" Skin="Outlook">

 

 

 

 

 

 

 

 

 

</rad:RadPanelbar>

 

 

 

 

 

 

 

 

</rad:RadAjaxPanel>

 

 

 

 

 

 

 

 

</div>

CodeBehind (VB) :

Adding items to panel:

 

Private

 

 

Sub BindTerritory()

 

 

 

'--Items added to PanelBar----------------------------------------------------------

 

 

 

 

For Each row As DataRow In dsDirs.Tables(0).Rows

 

 

 

Dim dataItem As New RadPanelItem()

 

dataItem.Text =

 

Convert.ToString(row("Sales_position_name"))

 

dataItem.Value =

 

Convert.ToString(row("Sales_pos_id"))

 

dataItem.Expanded =

 

False

 

 

 

 

 

panelChangeImpact.Items.Add(dataItem)

 

 

Dim item As New RadPanelItem()

 

dataItem.Items.Add(item)

 

 

Next

 

 

 

 

ClsGeneral.setDropDownTitle(ddlTerritory)

 

 

 

End Sub

 

Protected

 

 

Sub panelChangeImpact_ItemClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadPanelbarEventArgs) Handles panelChangeImpact.ItemClick

 

 

 

Dim ItemClicked As Telerik.WebControls.RadPanelItem = e.Item

 

 

 

Dim str As String = ItemClicked.Text

 

 

 

Dim radGridImpact As New RadGrid

 

 

 

 

 

radGridImpact.ID =

 

"rgvChangeImpact"

 

 

 

 

 

radGridImpact.Width =

 

Unit.Percentage(100)

 

radGridImpact.AllowMultiRowSelection =

 

True

 

 

 

 

 

radGridImpact.AutoGenerateColumns =

 

False

 

 

 

 

 

radGridImpact.Skin =

 

"Master"

 

 

 

 

 

radGridImpact.IsDynamic =

 

False

 

 

 

 

 

radGridImpact.SkinsPath =

 

"~/App_Themes/MasterTheme/Skins"

 

 

 

 

 

radGridImpact.MasterTableView.TableLayout =

 

GridTableLayout.Fixed

 

radGridImpact.MasterTableView.Width =

 

Unit.Percentage(100)

 

radGridImpact.MasterTableView.NoMasterRecordsText =

 

""

 

 

 

 

 

radGridImpact.ItemStyle.BorderStyle =

 

BorderStyle.Solid

 

radGridImpact.ItemStyle.BorderWidth =

 

Unit.Pixel(1)

 

radGridImpact.ItemStyle.BorderColor = Drawing.

 

Color.Black

 

radGridImpact.ClientSettings.EnablePostBackOnRowClick =

 

False

 

 

 

 

 

radGridImpact.ClientSettings.Selecting.AllowRowSelect =

 

True

 

 

 

 

 

radGridImpact.ClientSettings.Scrolling.AllowScroll =

 

True

 

 

 

 

 

radGridImpact.ClientSettings.Scrolling.ScrollHeight =

 

Unit.Pixel(140)

 

radGridImpact.ClientSettings.Scrolling.UseStaticHeaders =

 

True

 

 

 

 

 

radGridImpact.ClientSettings.Scrolling.SaveScrollPosition =

 

True

 

 

 

 

 

 

 

Dim column1 As New GridBoundColumn

 

 

 

 

 

column1.SortAscImageUrl =

 

"#"

 

 

 

 

 

column1.DataField =

 

"Rule_Violation"

 

 

 

 

 

column1.FilterImageUrl =

 

"#"

 

 

 

 

 

column1.UniqueName =

 

"Rule_Violation"

 

 

 

 

 

column1.SortExpression =

 

"Rule_Violation"

 

 

 

 

 

column1.SortDescImageUrl =

 

"#"

 

 

 

 

 

column1.HeaderText =

 

"Rule Violation"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column1)

 

 

Dim column2 As New GridBoundColumn

 

 

 

 

 

column2.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column2.DataField =

 

"Matric"

 

 

 

 

 

column2.HeaderText =

 

"<nobr>Metric Rule</nobr>"

 

 

 

 

 

column2.SortExpression =

 

"Matric"

 

 

 

 

 

column2.UniqueName =

 

"Matric"

 

 

 

 

 

column2.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column2.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column2)

 

 

Dim column3 As New GridBoundColumn

 

 

 

 

 

column3.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column3.DataField =

 

"Original"

 

 

 

 

 

column3.HeaderText =

 

"<nobr>Original</nobr>"

 

 

 

 

 

column3.SortExpression =

 

"Original"

 

 

 

 

 

column3.UniqueName =

 

"Original"

 

 

 

 

 

column3.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column3.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column3)

 

 

Dim column4 As New GridBoundColumn

 

 

 

 

 

column4.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column4.DataField =

 

"Adjusted_Approved"

 

 

 

 

 

column4.HeaderText =

 

"<nobr>Approved</nobr>"

 

 

 

 

 

column4.SortExpression =

 

"Adjusted_Approved"

 

 

 

 

 

column4.UniqueName =

 

"Adjusted_Approved"

 

 

 

 

 

column4.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column4.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column4)

 

 

Dim column5 As New GridBoundColumn

 

 

 

 

 

column5.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column5.DataField =

 

"Adjusted_Pending"

 

 

 

 

 

column5.HeaderText =

 

"<nobr>Approval Pending</nobr>"

 

 

 

 

 

column5.SortExpression =

 

"Adjusted_Pending"

 

 

 

 

 

column5.UniqueName =

 

"Adjusted_Pending"

 

 

 

 

 

column5.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column5.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column5)

 

 

Dim column6 As New GridBoundColumn

 

 

 

 

 

column6.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column6.DataField =

 

"Adjusted_Submission"

 

 

 

 

 

column6.HeaderText =

 

"<nobr>Submission Pending</nobr>"

 

 

 

 

 

column6.SortExpression =

 

"Adjusted_Submission"

 

 

 

 

 

column6.UniqueName =

 

"Adjusted_Submission"

 

 

 

 

 

column6.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column6.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column6)

 

 

Dim column7 As New GridBoundColumn

 

 

 

 

 

column7.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column7.DataField =

 

"Total_Adjusted"

 

 

 

 

 

column7.HeaderText =

 

"<nobr>Change Impact</nobr>"

 

 

 

 

 

column7.SortExpression =

 

"Total_Adjusted"

 

 

 

 

 

column7.UniqueName =

 

"Total_Adjusted"

 

 

 

 

 

column7.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column7.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column7)

 

 

Dim column8 As New GridBoundColumn

 

 

 

 

 

column8.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column8.DataField =

 

"GTotal"

 

 

 

 

 

column8.HeaderText =

 

"<nobr>Total</nobr>"

 

 

 

 

 

column8.SortExpression =

 

"GTotal"

 

 

 

 

 

column8.UniqueName =

 

"GTotal"

 

 

 

 

 

column8.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column8.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column8)

 

 

Dim column9 As New GridBoundColumn

 

 

 

 

 

column9.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column9.DataField =

 

"Change"

 

 

 

 

 

column9.HeaderText =

 

"<nobr>Total Change</nobr>"

 

 

 

 

 

column9.SortExpression =

 

"Change"

 

 

 

 

 

column9.UniqueName =

 

"Change"

 

 

 

 

 

column9.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column9.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column9)

 

 

Dim column10 As New GridBoundColumn

 

 

 

 

 

column10.DataFormatString =

 

"<nobr>{0}</nobr>"

 

 

 

 

 

column10.DataField =

 

"Allowed"

 

 

 

 

 

column10.HeaderText =

 

"<nobr>Allowed(Min, Max)</nobr>"

 

 

 

 

 

column10.SortExpression =

 

"Allowed"

 

 

 

 

 

column10.UniqueName =

 

"Allowed"

 

 

 

 

 

column10.SortAscImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Asc.gif"

 

 

 

 

 

column10.SortDescImageUrl =

 

"~/App_Themes/MasterTheme/Skins/Master/Desc.gif"

 

 

 

 

 

radGridImpact.MasterTableView.Columns.Add(column10)

 

 

AddHandler radGridImpact.ItemDataBound, AddressOf rgvChangeImpactSummary_ItemDataBound

 

ItemClicked.Items(0).Controls.Add(radGridImpact)

BindChangeSummaryDetails(radGridImpact, ItemClicked.Value)

 

 

End Sub

 

 

 

'Get call plan values.

Private

 

 

Sub BindChangeSummaryDetails(ByVal radGrid As RadGrid, ByVal strTerritoryID As String)

 

 

 

Dim sCallPalnValues As String

 

Dim ds As DataSet

 

 

 

Dim sTerrValue As String = String.Empty

 

 

 

If strTerritoryID = "" Then

 

 

 

Exit Sub

 

 

 

End If

 

 

 

'Get call plan values.

 

ds =

 

'some dataset

 

 

If ds Is Nothing OrElse ds.Tables.Count = 0 Then

 

 

 

'Dataset does not have any table.

 

radGrid.DataSource =

 

Nothing

 

radGrid.DataBind()

SbShowGridHeader(radGrid)

 

 

Exit Sub

 

 

 

End If

 

 

 

If ds.Tables(0).Rows.Count = 0 Then

 

 

 

Dim dr As DataRow = ds.Tables(0).NewRow()

 

dr(0) =

 

"No Data"

 

dr(1) = 1234

ds.Tables(0).Rows.Add(dr)

 

 

End If

 

 

 

With radGrid

 

.Width =

 

Unit.Percentage(100)

 

.MasterTableView.Width =

 

Unit.Percentage(100)

 

 

 

ClsGeneral.setSkinPathToGrid(radGrid)

 

.ClientSettings.Selecting.AllowRowSelect =

 

True

 

.AutoGenerateColumns =

 

False

 

 

 

'Sorting

 

.AllowSorting =

 

False

 

 

 

'Set the paging always true and use the page_size to max

 

.AllowPaging =

 

True

 

.AllowCustomPaging =

 

True

 

 

 

'Column Resizing

 

.ClientSettings.Resizing.EnableRealTimeResize =

 

False

 

.ClientSettings.Resizing.ResizeGridOnColumnResize = bResizingEnabled

.ClientSettings.Resizing.AllowColumnResize = bResizingEnabled

 

 

'If bResizingEnabled = True Then

 

.ClientSettings.Resizing.ClipCellContentOnResize = bResizingEnabled

.PageSize = 20

.DataSource = ds.Tables(0)

.DataBind()

 

 

End With

 

 

 

End Sub

 

Thanks
Bhaskar

bhaskar
Top achievements
Rank 1
 answered on 21 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?