Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
119 views

I am attempting to download a csv file from Azure container blob, read and load it to a dataset and then bind it to the radgrid.  

I can download the data and set it to a string (the sample data is listed below) but not sure how to load it to the dataset. 

When I load the data to a stream and then try to load it to a dataset, I received the following error: "Data at the root level is invalid. Line 1, position 1."

Here is a sample of the Data that is in the file ( I also tried it with no hdr record, same results...)

DeptCode,DeptName,AccountCode,Description,Qty,Expense
1001,Presidents,6220,FT Senior Administrator,1,126000
1001,Presidents,6221,FT Professional Staff,1,105050
1001,Presidents,6300,FT Administrative,1,60000
1001,Presidents,6425,FT Technical/Paraprofessional,1,70000
1001,Presidents,6426,PT Technical/Paraprofessional,1,32000

Here is my source code....

                    // Retrieve storage account from connection string.
                    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString);
                    // Create the blob client.
                    CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                    // Retrieve reference to a previously created container.
                    CloudBlobContainer container = blobClient.GetContainerReference("hsc2");
                    // Retrieve reference to a blob named "myblob".
                    CloudBlockBlob blockBlob = container.GetBlockBlobReference(FileUpload1.FileName); 
                    //...Create or overwrite the "myblob" blob with contents from a local file.
                    using (var memoryStream = new MemoryStream())
                    {
                        blockBlob.DownloadToStream(memoryStream);
                        memoryStream.Position = 0;
                        StreamReader streamReader = new StreamReader(memoryStream);
                        //String blobText = streamReader.ReadToEnd();
                        DataSet ds1 = new DataSet();
                        ds1.ReadXml(streamReader);

                        RadGrid1.DataSource = ds1;

                        RadGrid1.DataBind();

                        RadGrid1.Rebind();
                     }


John
Top achievements
Rank 1
 asked on 10 Feb 2018
0 answers
217 views

I got a question about the execution sequence/order between the script in RadCodeBlock and $(document).ready in JQuery.

I defined <telerik:RadDateTimePicker ID="RadDateTimePickerCalendarStart" runat="server"/><ClientEvents OnDateSelected="CalendarStartSelected" /> </telerik:RadDateTimePicker> and <asp:HiddenField ID="CalendarStartHidden" runat="server" Value="" />.

Added the following script to assign/store the selected date value into CalendarStartHidden hidden input.

<telerik:RadCodeBlock runat="server">
         <script type="text/javascript">
             function CalendarStartSelected(sender, eventArgs) {
                 var selectedDate = sender.get_selectedDate();
                 $("#<%=CalendarStartHidden.ClientID%>").val(selectedDate == null ? '' : selectedDate.format("MM/dd/yyyy"));
             }

       </script>
</telerik:RadCodeBlock>

 

I also want to do some extra work when date time is changed, and defined the following script in $(document).ready with JQuery:

            $('#<%=RadDateTimePickerCalendarStart.ClientID%>).on("change", function (event) {

               UseChangedDateTimeValueToCalculateData();

            });

 

However, UseChangedDateTimeValueToCalculateData is executed earlier than CalendarStartSelected when the date time is changing/changed.

Is there any way I can make UseChangedDateTimeValueToCalculateData is executed later than CalendarStartSelected?

My goal here, is to use the correct changed date time value, to calculate the final statistics number.

Thank you.

 

liu
Top achievements
Rank 1
 asked on 09 Feb 2018
0 answers
149 views

How to can i do to RadPivotGrid updates when i change the filters of my screen ?

When i change the filters, I'm verifying if the filters changed then I do a Rebind in the RadPivotGrid and then datasource change too, but doesn't update the RadPivotGrid.

How to can i fix this problem ?

Andre
Top achievements
Rank 1
 asked on 09 Feb 2018
1 answer
278 views

Hi,

 

Is it possible in any way to use separators like with the RadComboBox?

I have to show results in different groups in the Searchbox dropdown.

 

BR,

Marc

Attila Antal
Telerik team
 answered on 09 Feb 2018
1 answer
132 views

After last updates we start to have problems with speed on our apps, loading time is incredible slow, not only in grids but too in silverlight scheduler.

I want to know if some of the changes done on these versions affect to these elements. Our problems are focus on rendering, because we measure sql times and webservices times and are ok. We test this in several clients an seems not related to hardware as we have found these problems on cloud web (Azure) or in IIS servers (we test and increase RAM, CPU, etc).

Rumen
Telerik team
 answered on 09 Feb 2018
0 answers
198 views

Hi all

I have a RadComboBox:

<telerik:RadComboBox ID="radCmbRegioniFilter" runat="server"
 Filter="Contains" AutoPostBack="true" EnableLoadOnDemand="True"
 onchange="Page_BlockSubmit = false;"
 OnClientItemsRequesting="radCmbRegioniFilter_OnClientItemsRequesting">
 <WebServiceSettings Method="GetRegionAll" Path="~/controls/OnDemand.asmx" />
</telerik:RadComboBox>

When I click on the combobox the data are load correctly.

If I execute a postback and I click on the combobox, the webservice is call but the combobox contains only the selected item and blank in others rows. If I click again on combobox I see all data.

Why?

Thanks

SviPla
Top achievements
Rank 1
 asked on 08 Feb 2018
1 answer
219 views

Hi,

I am having a difficulty with RadCheckBox that whenever i check or uncheck a checkbox, all fields maintain their data (viewstate) except my fileupload control that resets to empty. I have tried Ajax asyncFileUpload and I have tried RadAsyncUpload controls but they behave the same when I check or uncheck a RadCheckBox. The controls are all in RadWindow and then in RadAjaxPanel. Plus the Checkbox that I am checking has no autopostback set, e.g. "chkIsComingled" and the FileUpload controls that are resetting are "uplProductionLine" and "uplGasLine"

 

 

I am attaching the HTML for this part below.

 

 

<telerik:RadWindow runat="server" ID="rdWinNewWell" Modal="True" Width="880px" AutoSize="true" AutoSizeBehaviors="Height" Title="New Well">
                                <ContentTemplate>
                                    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                                        <div>&nbsp;</div>
                                        <div>
                                            <table class="table myTable">
                                                <thead>
                                                    <tr>
                                                        <th colspan="4">Well Info
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>Well (*)</td>
                                                        <td>
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbWells" runat="server" Width="200px" Height="400px"
                                                                EmptyMessage="Type or Select a Well" DataValueField="API_CD" DataTextField="COMP_NAME"
                                                                MarkFirstMatch="true" OnSelectedIndexChanged="cmbWells_SelectedIndexChanged" AutoPostBack="true">
                                                            </telerik:RadComboBox>
                                                            <telerik:RadCheckBox ID="chkShowComingWells" runat="server" Text="" AutoPostBack="true" OnCheckedChanged="chkShowComingWells_CheckedChanged"></telerik:RadCheckBox>                                                            
                                                        </td>
                                                        <td>Field</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtField" runat="server" Text="" Enabled="false"></telerik:RadTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Location</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtLocation" runat="server" Text="" Enabled="false"></telerik:RadTextBox>
                                                        </td>
                                                        <td>Type</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtWellType" runat="server" Text="" Enabled="false"></telerik:RadTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>MOP</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtWellMOP" runat="server" Text="" Enabled="false"></telerik:RadTextBox>
                                                        </td>
                                                        <td>Spud Date</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtExpetedSpud" runat="server" Text="" Enabled="false"></telerik:RadTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Expected Oil (*)</td>
                                                        <td>
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtExpectedOil" runat="server" Type="Number" NumberFormat-DecimalDigits="3"></telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>Is Water Injector?</td>
                                                        <td>
                                                            <telerik:RadCheckBox ID="chkIsWaterInjector" runat="server" Text="" OnClientCheckedChanged="disableForm" AutoPostBack="false"></telerik:RadCheckBox>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div>
                                            <table class="table myTable">
                                                <thead>
                                                    <tr>
                                                        <th colspan="4">Production Flow Line
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>Stations
                                                        </td>
                                                        <td colspan="3">
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbStationsOfManifolds" runat="server"
                                                                EmptyMessage="Filter by Station" DataValueField="LOOKUP_CODE" DataTextField="LOOKUP_TEXT"
                                                                OnSelectedIndexChanged="cmbStationsOfManifolds_SelectedIndexChanged" AutoPostBack="true">
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Manifold (*)</td>
                                                        <td>
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbManifolds" runat="server" Width="300px" Height="400px" DropDownWidth="300px"
                                                                EmptyMessage="Type or Select a Manifold" MarkFirstMatch="true" OnSelectedIndexChanged="cmbManifolds_SelectedIndexChanged" AutoPostBack="true">
                                                                <HeaderTemplate>
                                                                    <table style="width: 265px" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td style="width: 175px;">Manifold Name
                                                                            </td>
                                                                            <td style="width: 70px;">Dist. m
                                                                            </td>
                                                                            <td style="width: 70px;">Avl. Slots
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <table style="width: 265px" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td style="width: 175px;">
                                                                                <%# DataBinder.Eval(Container, "Text")%>
                                                                            </td>
                                                                            <td style="width: 70px;">
                                                                                <%# DataBinder.Eval(Container, "Attributes['MANIFOLD_DISTANCE_DB']")%>
                                                                            </td>
                                                                            <td style="width: 70px;">
                                                                                <%# DataBinder.Eval(Container, "Attributes['AVAILABLE_SLOTS']")%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ItemTemplate>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                        <td>Slots</td>
                                                        <td>
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbSlot" runat="server" Width="200px" DropDownWidth="200px"
                                                                EmptyMessage="Type or Select a Slot #" MarkFirstMatch="true">
                                                                <HeaderTemplate>
                                                                    <table style="width: 160px" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td style="width: 60px;">Slot #
                                                                            </td>
                                                                            <td style="width: 100px;">Status
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <table style="width: 160px" cellspacing="0" cellpadding="0">
                                                                        <tr>
                                                                            <td style="width: 60px;">
                                                                                <%# DataBinder.Eval(Container, "Text")%>
                                                                            </td>
                                                                            <td style="width: 100px;">
                                                                                <%# DataBinder.Eval(Container, "Attributes['STATUS']")%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ItemTemplate>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Comingled?</td>
                                                        <td>
                                                            <telerik:RadCheckBox ID="chkIsComingled" runat="server" Text=""></telerik:RadCheckBox>
                                                        </td>
                                                        <td>Comingled At
                                                        </td>
                                                        <td>
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbComingleType" runat="server" Width="200px"
                                                                EmptyMessage="Select Comingle Type" DataValueField="LOOKUP_CODE" DataTextField="LOOKUP_TEXT">
                                                            </telerik:RadComboBox>
                                                            <i class="fa fa-info-circle" aria-hidden="true" id="infoComingleType" runat="server"></i>
                                                            <telerik:RadToolTip RenderMode="Lightweight" ID="tltComingleType" runat="server" TargetControlID="infoComingleType" RelativeTo="Element"
                                                                Position="TopLeft" RenderInPageRoot="true" AutoCloseDelay="0">
                                                                <p><b>At Line:</b> The well is comingled at flow line.</p>
                                                                <p><b>At Manifold:</b> The well is comingled in the station near manifold.</p>
                                                            </telerik:RadToolTip>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Estimated Length (*)</td>
                                                        <td>
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtEstimatedLengthProd" runat="server" EmptyMessage="Meters" Width="80px"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                            Actual Length
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtActualLengthProd" runat="server" EmptyMessage="Meters" Width="80px"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>Size (*)</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtEstimatedSizeProd" runat="server" Enabled="false"></telerik:RadTextBox>
                                                            <telerik:RadButton ID="btnMultiSizes" runat="server" Text="Select ..." OnClick="btnMultiSizes_Click">
                                                                <Icon PrimaryIconCssClass="rbConfig" />
                                                            </telerik:RadButton>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Temperature (*)</td>
                                                        <td>
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtTemperature" runat="server" EmptyMessage="°F"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>Pressure (*)</td>
                                                        <td>
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtPressure" runat="server" EmptyMessage="PSI"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4">
                                                            <div class="MyAttach">
                                                                <span>Attachment</span>
                                                                <span>
                                                                    <asp:FileUpload ID="uplProductionLine" runat="server" onchange="setImageThumbProd(this);" />                                                                    
                                                                </span>
                                                                <span>
                                                                    <img id="imgThumbProd" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Image" />
                                                                </span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div>
                                            <table class="table myTable">
                                                <thead>
                                                    <tr>
                                                        <th colspan="4">Gas Lift Line
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>Estimated Length</td>
                                                        <td>
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtEstimatedLengthGas" runat="server" EmptyMessage="Meters" Width="80px"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                            Actual Length
                                                            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="txtActualLengthGas" runat="server" EmptyMessage="Meters" Width="80px"
                                                                Type="Number" NumberFormat-DecimalDigits="3">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>Size</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtEstimatedSizeGas" runat="server" Enabled="false"></telerik:RadTextBox>
                                                            <telerik:RadButton ID="btnMultiSizesGas" runat="server" Text="Select ..." OnClick="btnMultiSizesGas_Click">
                                                                <Icon PrimaryIconCssClass="rbConfig" />
                                                            </telerik:RadButton>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Comments</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtGasLineComments" runat="server" TextMode="MultiLine" Rows="2" Width="250px" MaxLength="499"></telerik:RadTextBox>
                                                        </td>
                                                        <td colspan="2">
                                                            <telerik:RadCheckBox ID="chkIsShutinRequired" runat="server" Text="Is well shut-in required?"></telerik:RadCheckBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="4">
                                                            <div class="MyAttach">
                                                                <span>Attachment</span>
                                                                <span>
                                                                    <asp:FileUpload ID="uplGasLine" runat="server" onchange="setImageThumbGas(this);" />
                                                                </span>
                                                                <span>
                                                                    <img id="imgThumbGas" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Image" />
                                                                </span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div>
                                            <table class="table myTable">
                                                <thead>
                                                    <tr>
                                                        <th colspan="4">Connection Information
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>Start</td>
                                                        <td>
                                                            <telerik:RadDatePicker RenderMode="Lightweight" ID="dtpStartDate" Width="250px" runat="server" MaxDate="12-31-9999" DateInput-EmptyMessage="Pick Start Date"></telerik:RadDatePicker>
                                                        </td>
                                                        <td>End</td>
                                                        <td>
                                                            <telerik:RadDatePicker RenderMode="Lightweight" ID="dtpEndDate" Width="150px" runat="server" MaxDate="12-31-9999" DateInput-EmptyMessage="Pick End Date"></telerik:RadDatePicker>
                                                            <telerik:RadCheckBox ID="chkInfiniteEnd" runat="server" Text="Infinite" OnClientCheckedChanged="setEndDate" AutoPostBack="false"></telerik:RadCheckBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Status</td>
                                                        <td>
                                                            <telerik:RadComboBox RenderMode="Lightweight" ID="cmbStatus" runat="server" Width="250px"
                                                                EmptyMessage="Type or Select Status" DataValueField="STATUS_VALUE" DataTextField="STATUS_TEXT"
                                                                MarkFirstMatch="true">
                                                            </telerik:RadComboBox>
                                                        </td>
                                                        <td>FLAS Comments</td>
                                                        <td>
                                                            <telerik:RadTextBox RenderMode="Lightweight" ID="txtFLASComments" runat="server" TextMode="MultiLine" Rows="2" Width="250px" MaxLength="499"></telerik:RadTextBox></td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div>
                                            <table class="table myTable">
                                                <thead>
                                                    <tr>
                                                        <th colspan="4">History
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td colspan="4">
                                                            <telerik:RadGrid RenderMode="Lightweight" ID="rdgWFHistory" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
                                                                AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="2" OnNeedDataSource="rdgWFHistory_NeedDataSource">
                                                                <PagerStyle Mode="NumericPages"></PagerStyle>
                                                                <MasterTableView>
                                                                    <Columns>
                                                                        <telerik:GridBoundColumn SortExpression="CREATED_DT" HeaderText="Date" HeaderButtonType="TextButton"
                                                                            DataField="CREATED_DT">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="REVIEWED_BY" HeaderText="Reviewed By" HeaderButtonType="TextButton"
                                                                            DataField="REVIEWED_BY">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="REVIEWER_INFO" HeaderText="Reviewer Info" HeaderButtonType="TextButton"
                                                                            DataField="REVIEWER_INFO">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="STATUS" HeaderText="Status" HeaderButtonType="TextButton"
                                                                            DataField="STATUS">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="COMMENTS" HeaderText="Comments" HeaderButtonType="TextButton"
                                                                            DataField="COMMENTS">
                                                                        </telerik:GridBoundColumn>
                                                                    </Columns>
                                                                </MasterTableView>
                                                            </telerik:RadGrid>

                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div style="text-align: center;">
                                            <asp:Label ID="lblPermissionMSG" Text="" runat="server" ForeColor="Red" />
                                            <br />
                                            <telerik:RadButton ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click">
                                                <Icon PrimaryIconCssClass="rbOk" />
                                            </telerik:RadButton>
                                            <telerik:RadButton ID="btnCancel" runat="server" Text="Close" OnClientClicked="function(button, args){closeRadWin(button, args, 'rdWinNewWell');}">
                                                <Icon PrimaryIconCssClass="rbCancel" />
                                            </telerik:RadButton>
                                        </div>
                                        <telerik:RadNotification RenderMode="Lightweight" ID="ntfMessage" runat="server" Position="BottomRight"
                                            AutoCloseDelay="6000" Width="350" Height="200" EnableShadow="true" Animation="Fade" Title="Title"
                                            EnableRoundedCorners="true" TitleIcon="none" ContentIcon="~/Images/tick_icon32_2.png" KeepOnMouseOver="true">
                                        </telerik:RadNotification>
                                        <telerik:RadNotification RenderMode="Lightweight" ID="ntfError" runat="server" Position="BottomRight"
                                            AutoCloseDelay="6000" Width="350" Height="200" EnableShadow="true" Animation="Fade" Title="Title"
                                            EnableRoundedCorners="true" TitleIcon="none" ContentIcon="delete" KeepOnMouseOver="true">
                                        </telerik:RadNotification>
                                        <asp:HiddenField runat="server" ID="hdnSelectedmanifold" />
                                        <asp:HiddenField runat="server" ID="hdnFormType" Value="NEW" />
                                        <asp:HiddenField runat="server" ID="hdnTrxID" />
                                    </telerik:RadAjaxPanel>
                                </ContentTemplate>
                            </telerik:RadWindow>

Peter Milchev
Telerik team
 answered on 08 Feb 2018
0 answers
150 views

Hi All,
Some how I am using a telerik tool in my project. It gives a gif image. Below is the code of that image.

 

https://i-9compliance.arcsdev.com/reseller/WebResource.axd?d=OgRASih9SKffDS1F08rQZ15xiDsz6MAle1Yu_WJu7kX3Xix-QK_kpJzWxbCK7-EEqoYMELeKVTKo1ud_Sh8SAmgtPoeaEfHm7WatgzK515Rd05ddjn1EuwhyknlI7QcgM6NV6B5bkMv14GEyYUOYgGlLPxN2TDascX-ZrOr5IIc1&t=636160675801901311%22%3E

 

I want to replace that image. How can I do that?
Please suggest.

Thanks

Gaurav
Top achievements
Rank 1
 asked on 08 Feb 2018
2 answers
110 views
I am trying to do a redirect in codebehind based on the value a user has selected in a combobox.  Can someone please tell me how to access the value? Using VB.NET please!

Thanks!    

**UPDATE: How do I access the button as well?  Can someone give me a codebehind example please in VB.NET  

<telerik:RadPanelBar ID="RadPanelBar2" Runat="server" Width="100%" ExpandMode="SingleExpandedItem">
                    <Items>
                        <telerik:RadPanelItem runat="server" Text="PURCHASE ACCOUNT CREDITS">
                            <Items>
                                <telerik:RadPanelItem Value="AccountCredits" runat="server">
                                    <ItemTemplate>
                                        <table width="100%" border="0" cellspacing="2" cellpadding="2">
                                            <tr align="center">
                                                <td>How many credits would you like to purchase?</td>
                                            </tr>
                                            <tr align="center">
                                                <td>
                                                    <telerik:RadComboBox ID="cbxCredits" runat="server">
                                                        <Items>
                                                            <telerik:RadComboBoxItem runat="server" Text="$1.00 - 4 Credits" Value="1.00" />
                                                            <telerik:RadComboBoxItem runat="server" Text="$5.00 - 25 Credits" Value="5.00" />
                                                            <telerik:RadComboBoxItem runat="server" Text="$10.00 - 50 Credits" Value="10.00" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <telerik:RadButton ID="btnCheckout" runat="server" Text="CONTINUE TO CHECKOUT..."></telerik:RadButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>

Dennis
Top achievements
Rank 2
 answered on 07 Feb 2018
1 answer
221 views

I have a ComboBox that is querying the database to populate itself using LoadOnDemand and calling a method specified by WebServiceSettings-Method property. It dynamically updates the list based on what the user has typed in the box. Is there a way to "debounce" calls to the web method as making three calls when the user types in three characters instead on one when they finish typing is hitting the database harder than I would like. I have tried setting a debounce timer on the call to my JavascriptOnClientItemsRequesting function, but it seems to not wait on my Javascript timer before calling the web method. Here is my code:

01.<telerik:RadComboBox ID="myDropdown"
02.runat="server"
03.EnableLoadOnDemand="true"
04.IsCaseSensitive="false"
05.MarkFirstMatch="true"
06.Skin="WebBlue"
07.Width="130px"
08.Height="120px"
09.AllowCustomText="true"
10.ShowWhileLoading="false"
11.ItemRequestTimeout="0"
12.ShowDropDownOnTextboxClick="true"
13.ShowToggleImage="false"
14.CssClass="TextBox"
15.EnableVirtualScrolling="true"
16.OnClientBlur="CustComboBoxBlurHandler"
17.DropDownWidth="200px"
18.CloseDropDownOnBlur="true"
19.OnClientItemsRequesting="CustComboBoxSetContext"
20.OnClientSelectedIndexChanged="CustComboBoxSelectedIndexChangedHandler"
21.ClearOnBlur="true" >
22.  <WebServiceSettings Method="Search_GetCustomerNameNosWithJobs" Path="Lookups.asmx" />
23.  <ClientItemTemplate>
24.    <table width="100%" cellpadding="0" cellspacing="0" border="0">
25.      <tr height="12px">
26.        <td>#= Text #</td>
27.        <td>#= Attributes["Name"] #</td>
28.      </tr>
29.     </table>
30.  </ClientItemTemplate>
31.</telerik:RadComboBox>
01.var debounceTimer;
02.var debounceTimeout = 200;
03.function CustComboBoxSetContext(sender, args) {
04.   clearTimeout(debounceTimer);
05.   debounceTimer = setTimeout(SetContext, debounceTimeout, sender, args);
06.}
07. 
08.function SetContext(sender, args) {
09.    var context = args.get_context();
10.    if (!sender.prefix)
11.        sender.prefix = "";
12.    if (!window.event || sender.directcall) {
13.        sender.prefix = args.get_text();
14.    }
15.    var id = sender.get_id();
16.    if (sender.prefix === "") {
17.        args.set_cancel(true); // cancel sever call if nothing typed in
18.        return false;
19.    }
20.    context["prefix"] = sender.prefix;
21.    return true;
22.}
Max
Top achievements
Rank 1
 answered on 07 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?