When I try to retrive a cell value, its returning ' ' if the value is null. Is something wrong in the code?
why doesn't it just return empty string('') instead of ' '?
Thank you
Neelima
Private Sub RadgridDestination_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadgridDestination.SelectedIndexChanged Dim row As GridDataItem = RadgridDestination.Items(RadgridDestination.SelectedIndexes(0)) btnUpdate.Visible = True uc_Addr.Visible = True btnAdd.Visible = False With uc_Addr ' uc_Addr is an User Control .Desc = row("Description").Text .Addr1 = row("Address1").Text .Addr2 = row("Address2").Text 'retuns ' ' if the cell value is null. .State.SelectedValue = row("StateID").Text .City.SelectedValue = row("CityID").Text .Zip.SelectedValue = row("ZipID").Text .Phone = row("Phone").Text 'retuns ' ' if the cell value is null. End With End Sub<telerik:RadGrid ID="RadgridDestination" runat="server" AllowSorting="True" ShowGroupPanel="True" AutoGenerateColumns="False" Skin="Sunset" AllowPaging="True" GridLines="None"> <GroupingSettings ShowUnGroupButton="True" /> <ClientSettings AllowDragToGroup="True" allowcolumnsreorder="True" columnsreordermethod="Reorder" reordercolumnsonclient="True" > </ClientSettings> <MasterTableView EditMode="InPlace" DataKeyNames="Destination_ID" GroupLoadMode="Client" > <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridButtonColumn CommandName="Select" Text="Edit" ButtonType="ImageButton" UniqueName="column1" ImageUrl="Images/Edit.gif"> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="Destination_ID" HeaderText="Destination_ID" visible="False" UniqueName="Destination_ID" ReadOnly="true"/> <telerik:GridBoundColumn DataField="Addr_Desc" HeaderText="Description" UniqueName="Description" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Addr1" HeaderText="Address1" UniqueName="Address1" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Addr2" HeaderText="Address2" UniqueName="Address2" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="State" HeaderText="State" UniqueName="State" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" UniqueName="Zip" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Phone" HeaderText="phone" UniqueName="Phone" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Start_Latitude" HeaderText="Lat" UniqueName="Lattitude" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Start_Longitude" HeaderText="Longt" UniqueName="Longitude" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="State_ID" UniqueName="StateID" Visible="false"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City_ID" UniqueName="CityID" Visible="false"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Zip_ID" UniqueName="ZipID" Visible="false"></telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="Delete"> </telerik:GridButtonColumn> </Columns> <EditFormSettings> <EditColumn UniqueName="EditCommandColumn1"></EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid>
OnClientItemsRequesting simply cancels the request if less than 3 chars are typed, example from the knowledge base.<telerik:RadComboBox ID="rcbOrganizationName" Runat="server" OnSelectedIndexChanged="RcbOrganizationNameSelectedIndexChanged" OnItemsRequested="RcbOrganizationNameItemsRequested" OnClientItemsRequesting="OnClientItemsRequesting" EnableLoadOnDemand="true" AllowCustomText="True" AutoPostBack="True" EmptyMessage="Choose" MarkFirstMatch="false" EnableItemCaching="true" CausesValidation="false" TabIndex="2" ShowMoreResultsBox="false" MaxLength="50" MaxHeight="300px" Width="250px"></telerik:RadComboBox >e.SeriesItem.ActiveRegion.Tooltip = toolTip.ToString();
it assign the toolTip to the two serieschart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();
chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip =
"Hi Series 2";
I get exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Line 459: RadChart chart = (RadChart) sender;
Line 460: chart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();
Line 461: chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip = "Hi Series 2";
|
void
ChartFinancialImpact_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)
{
DataRowView physicianDeviation = (DataRowView)e.DataItem;
StringBuilder toolTip = new StringBuilder();
toolTip.Append("Load:" + physicianDeviation["PhysicianLoad"].ToString() );
//e.SeriesItem.ActiveRegion.Tooltip = toolTip.ToString();
RadChart chart = (RadChart) sender;
chart.Series[0].Items[e.SeriesItem.Index].ActiveRegion.Tooltip = toolTip.ToString();
//chart.Series[1][e.SeriesItem.Index].ActiveRegion.Tooltip = "Hi Series 1"; ==> ERROR
}
How can i bind GridDropDownColumn with dataset from behind code
telerik:RadGrid ID="radgdBOQ" runat="server" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="radgdBOQ_NeedDataSource" OnInsertCommand="radgdBOQ_InsertCommand" ShowStatusBar="True" OnDeleteCommand="radgdBOQ_DeleteCommand" OnUpdateCommand="radgdBOQ_UpdateCommand" Skin="WebBlue"> <MasterTableView DataKeyNames="bqmiBoqID" CommandItemDisplay="TopAndBottom"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderButtonType="None" HeaderText="Edit"> <HeaderStyle HorizontalAlign="Center" Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Are You Sure To Delete ?" ConfirmTitle="Delete" HeaderButtonType="None" HeaderText="Delete" Text="Delete" UniqueName="DeleteCommandColumn"> <HeaderStyle HorizontalAlign="Center" Width="50px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridButtonColumn> <telerik:GridNumericColumn DataField="bqmiItemCode" DataType="System.Int32" HeaderText="Item Code" UniqueName="bqmiItemCode"> <HeaderStyle HorizontalAlign="Center" Width="75px" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridNumericColumn> <telerik:GridBoundColumn DataField="bqmiItemDescription" HeaderText="Description" UniqueName="bqmiItemDescription"> <HeaderStyle HorizontalAlign="Center" Width="150px" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="bqmiUnit" HeaderText="Unit" UniqueName="bqmiUnit"> <HeaderStyle HorizontalAlign="Center" Width="50px" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridNumericColumn DataField="bqmiPrice" DataType="System.Decimal" HeaderText="Price" NumericType="Currency" UniqueName="bqmiPrice" DefaultInsertValue="0"> <HeaderStyle HorizontalAlign="Center" Width="100px" /> <ItemStyle HorizontalAlign="Right" /> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="bqmiQty" DataType="System.Decimal" HeaderText="Quantity" UniqueName="bqmiQty" DefaultInsertValue="0"> <HeaderStyle HorizontalAlign="Center" Width="100px" /> <ItemStyle HorizontalAlign="Right" /> </telerik:GridNumericColumn> <telerik:GridCalculatedColumn DataFields="bqmiPrice,bqmiQty" DataType="System.Decimal" Expression="{0}*{1}" HeaderText="Amount" UniqueName="bqmiAmount"> </telerik:GridCalculatedColumn> <telerik:GridDropDownColumn HeaderText="Drop" UniqueName="drop" DataField="drop" DefaultInsertValue="0"> </telerik:GridDropDownColumn> </Columns> <EditFormSettings> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> </telerik:RadGrid>