User Profile & Activity

Ravinder Singh Member
Page
of 2

Hi Yudi,

It works !!! Thanks a lot!

Ravinder

Hi,

Does anyone know the solution for this. This is very urgent request....

Thanks,

Ravinder

Hi,

I got the solution working for my scenario. I thought it would be good for all to share the solution.

I Used the webGrid client side event : OnEnterEditMode; to set the value for the webinput control. e.g

WebInput1.SetValueData(CompleteDateTimeToSelect); 

Note that CompleteDateTimeToSelect variable should have the same format as used in the MaskExpression.

In addition to this, I found that when I was trying to use the  <DisplayFormat></DisplayFormat> tag then the datetime value in the webinput was not working. So , i tried removing DispalyFormat tag and it worked.

Here is code for webinput:

<ISWebInput:WebInput ClientSideEvents-OnBlur="WebInput1_OnBlur" ID="WebInput1" runat="server">

    <HighLight IsEnabled="True"  Type="Phrase"  />

    <EditFormat Type="DateTime" Format="MM/dd/yyyy HH:mm" IsEnabled="true">

        <MaskInfo  MaskExpression="00/00/0000 00:00">

        </MaskInfo>

        <ErrorWindowInfo IsEnabled="False">

        </ErrorWindowInfo>

    </EditFormat>

    <DateTimeEditor IsEnabled ="true"></DateTimeEditor>

    <CultureInfo CultureName="en-US">

    </CultureInfo>

</ISWebInput:WebInput>

Now, to get back the date selected by the user and to set in the webinput, I Used the following client side events. 

WebInputs : OnBlur event and WebGrid's OnExitEditMode event.

Hope will help if someone have kind of same problem/case

Thanks,

Ravinder


Posted: September 22, 2015 9:07 AM

Thanks Yudi. We really appreciate your response on this.

I have put the abvoe implementation in my code. Now, I can see the calender control on click of my grid column cell. However, I am only getting dates selection. I do not get the Time selection in the control.

Please let me know which other properties I would need to set in order to select 'Time' also.

Thanks

Ravinder

Posted: August 13, 2014 9:29 AM

I found the solution. Setting the following properties in the InitializeDataSource event makes it work.

grid.DataMember = "Table Name";

grid.RootTable.DataMember = "Table Name";

e.DataSource = ds; // data set;

Thanks,
Ravinder

 

Posted: August 13, 2014 7:48 AM

Hi Hans,

Thank you for your reply. I have gone thru the example that you have mentioned. In this example we have only one grid on the page which can binded to different data sources based on user selection from the drop down. However, in our case we need to generate multiple grids on the run time.

Try to think in a way in which we need to select multiple options (data sources) from the dropdown in the changeDS.aspx example and based on the multiple selection choosen by the user, we need to show that many grids(each grid binding to a different data source) on the page.

So, it seems the challange would be in calling the grid events like InitializeDataSource,InitializePostBack and PrepareDataBinding.

I hope now I am able to clarify my problem.

Thanks,
Ravinder

 

Hi Bernard,

 

Thanks for your reply. Seems you are close to our requirement. In your example you are adding All the nodes. In your example, if we add one node dynamically, then you are keeping that node in hidden field, and then adding all the nodes in the tree view.

However, we do not want that. We want that whatever nodes that has been added earlier should remain in the tree view, and we just want to add single node at a time dynamically from server side. So that we would not require any hidden variable. Also, we want the nodes to be added on the click of a button not in the WebTreeView1_InitializeChildNodes event.

Looking forward a response from your side...

 

Thanks,
Ravinder

 

Hi Bernard,

Thanks again for sharing the sample you have created. However, it does not maches with our requirements. You are adding the nodes dynamically on he client side (using the java script).

However, in our case, we need to add nodes through post back. The reason to add the dynamic nodes through post back is that we also getting some data from database depending upon the type of node user has choosen to add dynamically.

Hope I am able to clarify my point.

Wish to receive a response that sort out our problem...

 

Thanks,

Ravinder

 

 

 

Hi Bernard,

Thanks again for sharing the sample you have created. However, it does not maches with our requirements. You are adding the nodes dynamically on he client side (using the java script).

However, in our case, we need to add nodes through post back. The reason to add the dynamic nodes through post back is that we also getting some data from database depending upon the type of node user has choosen to add dynamically.

Hope I am able to clarify my point.

Wish to receive a response that sort out our problem...

 

Thanks,

Ravinder

 

 

 

Hi Bernard,

Thank you for your example that you have shared. Your example is loading all the nodes at a one go. It fetches the data from DB and creates all the nodes at one go.

In our case we need to bound the data like you did on the page load. But, in addition to this, once the page is loaded, there is a drop down on the page, and user will choose any value from the drop down and then user clicks on the add selected value to the tree view. Once user clicks on the button to add new value, the new value should be added in the tree view control as a new node.

 

Our problem is that, dynamically adding of a single node on click of button works fine. But, when we are trying to add another node (dynamically), the older node that we just added gets replaced by the new node. So, we are unable to set more than one node on the fly (at runtime) on IE 8 Browser.

 

Hope I am able to clarify my point. Please let me know in case you need any other info.

Waiting for a reply...

 

Thanks,

Ravinder

 

All times are GMT -5. The time now is 10:37 PM.
Previous Next