Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
Author | Forum: PowerWEB LiveControls for ASP.NET Topic: Focus in livedatagrid |
Gavall From: San Jose, Costa Rica Posts: 3 Member Since: 03/16/06 |
posted April 10, 2006 8:26 PM Hi!!! How I can put focus() in livedatagrid when this is in EditCommand state? Thanks |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted April 11, 2006 5:50 PM Hi, Why do you need to do this? What exactly are you trying to do? Or what is not working for you? Thanks, -ken |
Gavall From: San Jose, Costa Rica Posts: 3 Member Since: 03/16/06 |
posted April 11, 2006 7:00 PM Hi, I have a livedatagrid, it contains a LiveEditCommandColumn, when the Link is pressed, qualify the fields so that the user can modify the information, I need immediately when the Link is pressed, focus goes to the first field in the livedatagrid. This is mi firts field <cc1:LiveTemplateColumn HeaderText="Name"> <HeaderStyle HorizontalAlign="Center" Width="195px"></HeaderStyle> <ItemTemplate> <cc1:LiveLabel id ="txtName" Width="70px" Font-Names="Arial" Font-Size="12px" Text = '<%# DataBinder.Eval ( Container.DataItem, "Name")%>' Runat="server" > </cc1:LiveLabel> </ItemTemplate> <FooterTemplate> <cc1:LiveTextBox id="txtInsName" Width="70px" Text="" Runat="server" Font-Names="Arial" Font-Size="12px"></cc1:LiveTextBox> </FooterTemplate> <ItemStyle HorizontalAlign="Center"></ItemStyle> <EditItemTemplate> <cc1:LiveTextBox id="txtEditName" Width="70px" Font-Names="Arial" Font-Size="12px" Text = '<%# DataBinder.Eval ( Container.DataItem, "Name")%>' Runat="server"> </cc1:LiveTextBox> </EditItemTemplate> </cc1:LiveTemplateColumn> Thanks |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted April 13, 2006 11:02 AM Hi, I can tell you in general terms what you would need to do. You would need write some javascript that found and set the focus on the element in question (unfortunately, I do not have example javascript to do this). You could send the javascript to the client in the EditCommand event handler, by using BufferedScript.Write. For example: //myJavaScriptFunction is a string containing the //Javascript needed to set focus on the item to be edited LiveDataGrid1.BufferedScript.Write(myJavaScriptFunction); -ken |
Gavall From: San Jose, Costa Rica Posts: 3 Member Since: 03/16/06 |
posted April 17, 2006 6:48 PM Hi, thanks, Gaby |
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
![]() |