Replies
Hello Ikenna,
Thank you for posting in our forum.
Session variables can be accessed on the client side. For example you could check the value by calling:
alert('<%=Session["RegisterId"] %>');
Anything between the "<%" and "%>" runs at the server so it will evaluate the current value of the session. However since it runs on the server it won’t be aware of any client side defined variables.
Ultimately the session only exists on the server side so I would advise you to not attempt to set it directly on the client. Instead use a hidden field to store the values you need and then access the hidden field value on the server side from where you can store it in session if needed.
Let me know if you have any questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello,
The new line that get created when you use alt+enter is actually a “/r/n” string when represented as a cell value. So to add such value you just need to add “/r/n” where you need the new line in the cell. So for example:
cell2.Value = "Sample Text , Sample Text \r\n \r\n \r\n Some more text \r\n Custom text";
Would generate a text in a cell with new lines. Also keep in mind that the WrapText property needs to be set to true:
cell2.CellFormat.WrapText = ExcelDefaultableBoolean.True;
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
Hello,
Thank you for posting in our forum.
Select all functionality is currently not an available feature but you can manually implement this by following these steps:
1. Create a header template with a check box inside.
<HeaderTemplate>
<input type="checkbox" id="chkBox" onchange="return CheckChanged(event);" />
Select All
</HeaderTemplate>
2.In the onChange client side event manually select and deselect all item and set the corresponding values in the input box.
function CheckChanged(e) {
var value="";
var wdd = $find("WebDropDown1");
for (var i = 0; i < wdd.get_items().getLength(); i++) {
if (e.target.checked) {
value+= wdd.get_items().getItem(i).get_text()+", ";
wdd.get_items().getItem(i).select(false);
}
else {
wdd.get_items().getItem(i).unselect(false);
}
}
wdd.set_currentValue(value,true);
wdd.closeDropDown();
}
Please refer to the attached sample and let me know if you have any questions or concerns regarding this.
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello demoend ,
When using a template column you’ll notice that when you get the value of the cell it will contain the html representation of a button. It’s not recommended to override this value. Instead you could use a hidden column that will contain the Boolean data you need. It can be a standard data field which you can update as any other. Set the Hidden field for that field to true and it won’t be visible on the client but you can still access and update its value. I’m attaching a slightly modified sample for your reference.
Let me know if you have any further questions regarding this.
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello demoend ,
Are you using a template columns containing a button for the child band? Try getting the active cell with the following line:
var activeCell = grid.get_gridView().get_behaviors().get_activation().get_activeCellResolved();
I’m also attaching a working sample for your reference. Let me know if you need further assistance with this.
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello demoend ,
Thank you fo posting in our forum.
You can get the grid element with the $find(“gridId”) method and from there you have access to the get_GridView and other methods native to the grid. For example:
function BtnClick() {
var grid = $find("WebHierarchicalDataGrid1");
var activeRow = grid.get_gridView().get_behaviors().get_activation().get_activeCell().get_row();
}
Let me know if you have any further questions or concerns regarding this.
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello tctsaravanakumar ,
Let me know if I understood your scenario correctly.
Your web drop down has to filter on each value changing based on the new (changed) value and when you select a value from the drop down you want to show some text from your query into some textboxes.
I’ve prepared a sample for your reference. Here is some additional information that you might find useful:
1)For the event in which you’re setting the text of the textboxes you’ll need to set an autopostback flag to trigger a full page postback so that the changes will be made to the text boxes. So in your case set the autopostback flag for SelectionChanged to On. Also set the AutoSelectOnMatch property of the WebDropDown to false. This is due to the fact that when it’s on the selection would trigger on every value change .
2) If you want to persist the current filtered values over postbacks (for example when you filter by some value and then select a value from the drop down and you would want that filtered values to be persisted when the page reloads) you’ll need the EnableViewState="true" and EnableAjaxViewState="true".
3) You can get the new selection trough the e.NewSelection which would return the index of the selected item. To persist the selection itself you’ll need to in the SelectionChanged event the current item to be selected and also set the CurrentValue property to the current item’s value”
Ex:
protected void WebDropDown1_SelectionChanged(object sender, Infragistics.Web.UI.ListControls.DropDownSelectionChangedEventArgs e)
{
var currentVal = WebDropDown1.Items[Convert.ToInt32(e.NewSelection)].Text;
int index = Convert.ToInt32(e.NewSelection);
WebDropDown1.CurrentValue = currentVal;
WebDropDown1.Items[index].Selected = true;
text1.Text = currentVal;
}
Please refer to the attached sample and let me know if this is similar to your scenario. If not please feel free to modify this sample to better depict your scenario.
Thank you for your cooperation.
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support